Ignore excess hostages during scoring
Descent 2 secret levels allow a player to rescue hostages that are not counted in `total_hostages`, so a player can exit with more hostages saved than were in the mine. Change the scoring logic not to penalize a player for saving these unaccounted hostages.
This commit is contained in:
parent
cd09a742a0
commit
0a1758f44f
|
@ -1276,8 +1276,11 @@ static void DoEndLevelScoreGlitz()
|
||||||
auto &hostage_text = m_str[c++];
|
auto &hostage_text = m_str[c++];
|
||||||
if (cheats.enabled)
|
if (cheats.enabled)
|
||||||
snprintf(hostage_text, sizeof(hostage_text), "Hostages saved: \t%u", hostages_on_board);
|
snprintf(hostage_text, sizeof(hostage_text), "Hostages saved: \t%u", hostages_on_board);
|
||||||
else if (const auto hostages_lost = LevelUniqueObjectState.total_hostages - hostages_on_board)
|
else if (LevelUniqueObjectState.total_hostages > hostages_on_board)
|
||||||
|
{
|
||||||
|
const auto hostages_lost = LevelUniqueObjectState.total_hostages - hostages_on_board;
|
||||||
snprintf(hostage_text, sizeof(hostage_text), "Hostages lost: \t%u", hostages_lost);
|
snprintf(hostage_text, sizeof(hostage_text), "Hostages lost: \t%u", hostages_lost);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
all_hostage_points = hostages_on_board * 1000 * (underlying_value(Difficulty_level) + 1);
|
all_hostage_points = hostages_on_board * 1000 * (underlying_value(Difficulty_level) + 1);
|
||||||
|
|
Loading…
Reference in a new issue