From 28014de5d449bd01711b4e43444d07676e614bcf Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sun, 21 Jun 2015 22:55:00 -0400 Subject: [PATCH] Add legacy compatibility flag for Affect PC nodes in combat mode --- src/boe.consts.hpp | 1 + src/boe.party.cpp | 2 ++ src/boe.specials.cpp | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/boe.consts.hpp b/src/boe.consts.hpp index ad4b2fd9..4b573213 100644 --- a/src/boe.consts.hpp +++ b/src/boe.consts.hpp @@ -25,6 +25,7 @@ #define NUM_OF_HORSES 30 /* stuff done flags */ +#define SDF_COMBAT_SELECT_PARTY 305][3 #define SDF_SKIP_STARTUP 305][4 // preferably deprecated #define SDF_LESS_SOUND 305][5 #define SDF_NO_TARGET_LINE 305][6 diff --git a/src/boe.party.cpp b/src/boe.party.cpp index 8957112c..f354c254 100644 --- a/src/boe.party.cpp +++ b/src/boe.party.cpp @@ -310,10 +310,12 @@ void put_party_in_scen(std::string scen_name) { if(univ.scenario.format.prog_make_ver[0] < 2){ PSD[SDF_RESURRECT_NO_BALM] = 1; PSD[SDF_NO_BOAT_SPECIALS] = 1; + PSD[SDF_COMBAT_SELECT_PARTY] = 1; PSD[SDF_TIMERS_DURING_REST] = 0; } else { PSD[SDF_RESURRECT_NO_BALM] = 0; PSD[SDF_NO_BOAT_SPECIALS] = 0; + PSD[SDF_COMBAT_SELECT_PARTY] = 0; PSD[SDF_TIMERS_DURING_REST] = 1; } } diff --git a/src/boe.specials.cpp b/src/boe.specials.cpp index ea915585..c7e5dc3f 100644 --- a/src/boe.specials.cpp +++ b/src/boe.specials.cpp @@ -1965,7 +1965,9 @@ void run_special(eSpecCtx which_mode,short which_type,short start_spec,location case eSpecCtx::OUTDOOR_ENC: case eSpecCtx::FLEE_ENCOUNTER: case eSpecCtx::WIN_ENCOUNTER: case eSpecCtx::DROP_ITEM: case eSpecCtx::SHOPPING: case eSpecCtx::STARTUP: // Default behaviour - select entire party, or active member if split or in combat - if(is_combat()) current_pc_picked_in_spec_enc = &univ.party[current_pc]; + // We also have a legacy flag - originally, it always defaulted to whole party + if(is_combat() && !PSD[SDF_COMBAT_SELECT_PARTY]) + current_pc_picked_in_spec_enc = &univ.party[current_pc]; else { if(univ.party.is_split() && cur_node.type != eSpecType::AFFECT_DEADNESS) current_pc_picked_in_spec_enc = &univ.party.pc_present();