Check for party death before the victory handler instead of checking in the end scenario node
- This means killing the party after calling the end scenario node will give the death screen instead of the victory screen - Reversing the order of the checks also makes it airtight in case of any future changes
This commit is contained in:
@@ -1448,10 +1448,10 @@ bool handle_action(sf::Event event) {
|
||||
if(need_redraw) draw_terrain();
|
||||
if(need_reprint || need_redraw) print_buf();
|
||||
|
||||
if(end_scenario)
|
||||
handle_victory();
|
||||
else if(!univ.party.is_alive())
|
||||
if(!univ.party.is_alive())
|
||||
handle_party_death();
|
||||
else if(end_scenario)
|
||||
handle_victory();
|
||||
|
||||
are_done = All_Done;
|
||||
return are_done;
|
||||
|
@@ -2236,13 +2236,6 @@ void general_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
|
||||
*a = (spec.ex1a == 0) ? 1 : 0;
|
||||
break;
|
||||
case eSpecType::END_SCENARIO:
|
||||
// If party died at some point during the special node, they shouldn't get a victory.
|
||||
// (Adapted from Windows version)
|
||||
store_val = 6;
|
||||
for(i = 0; i < 6; i++)
|
||||
if(univ.party[i].main_status != eMainStatus::ALIVE)
|
||||
store_val--;
|
||||
if(store_val == 0) break;
|
||||
end_scenario = true;
|
||||
break;
|
||||
case eSpecType::SET_POINTER:
|
||||
|
Reference in New Issue
Block a user