From 1d491e3b2a4f5692f23061c7d300a0e866da2283 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 10 Aug 2024 12:09:35 -0400 Subject: [PATCH] Address a dead store issue found by the static analyzer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I kept this separate from the other dead store issues because it clearly changes behaviour – the change makes teleport_party NEVER play an animation in combat. Thus, in case the change is determined to be wrong, this is to document what happened and why. --- src/game/boe.specials.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/game/boe.specials.cpp b/src/game/boe.specials.cpp index fb141064..f600116b 100644 --- a/src/game/boe.specials.cpp +++ b/src/game/boe.specials.cpp @@ -1329,6 +1329,7 @@ void teleport_party(short x,short y,short mode) { // TODO: Teleport sound? (Sound 10) location l; bool fadeIn = false, fadeOut = false; + if(is_combat()) mode = 1; if(mode == 0 || mode == 2) fadeOut = true; if(mode == 0 || mode == 3) fadeIn = true; @@ -1336,9 +1337,6 @@ void teleport_party(short x,short y,short mode) { for(int i = 0; i < 6; i++) univ.party[i].status[eStatus::FORCECAGE] = 0; - if(is_combat()) - mode = 1; - l = univ.party.town_loc; update_explored(l);