From b5ae1ea91b0e879b906d67f14f34fdb4e75de850 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 4 May 2025 14:07:42 -0500 Subject: [PATCH] Fix stairs triggering special nodes at current pos in new town --- src/game/boe.specials.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/boe.specials.cpp b/src/game/boe.specials.cpp index 5be733d9..e4e4167f 100644 --- a/src/game/boe.specials.cpp +++ b/src/game/boe.specials.cpp @@ -226,7 +226,9 @@ bool check_special_terrain(location where_check,eSpecCtx mode,cPlayer& which_pc, } if((mode == eSpecCtx::TOWN_MOVE || (mode == eSpecCtx::COMBAT_MOVE && which_combat_type == 1)) && can_enter && univ.town.is_special(where_check.x,where_check.y)) { - for(short i = 0; i < univ.town->special_locs.size(); i++) + // Stop this loop if the current town changes. + short town_num = univ.party.town_num; + for(short i = 0; town_num == univ.party.town_num && i < univ.town->special_locs.size(); i++) if(where_check == univ.town->special_locs[i]) { spec_num = univ.town->special_locs[i].spec; bool runSpecial = false;