Address a dead store issue found by the static analyzer.

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.
This commit is contained in:
2024-08-10 12:09:35 -04:00
parent 104f6d6b0b
commit 1d491e3b2a

View File

@@ -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);