Oops... Forgot to change some references here.

This commit is contained in:
Mari the Deer 2024-05-04 18:37:52 +02:00
commit d2bb60b559
2 changed files with 8 additions and 5 deletions

View file

@ -1,3 +1,3 @@
[default] [default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1128 \cu(Thu May 2 10:19:12 CEST 2024)\c-"; SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1129 \cu(Sat May 4 18:37:52 CEST 2024)\c-";
SWWM_SHORTVER="\cw1.3pre r1128 \cu(2024-05-02 10:19:12)\c-"; SWWM_SHORTVER="\cw1.3pre r1129 \cu(2024-05-04 18:37:52)\c-";

View file

@ -1205,20 +1205,23 @@ Class Chancebox : Actor
s.scale *= 2.4; s.scale *= 2.4;
} }
// handling these AFTER item drop should ensure no wacky stuff happens with repeated "all clear" events // handling these AFTER item drop should ensure no wacky stuff happens with repeated "all clear" events
// note: if we delay it like this, we have to check for non-null user just to be safe
if ( bCOUNTITEM ) if ( bCOUNTITEM )
{ {
user.player.itemcount++; if ( target ) target.player.itemcount++;
level.found_items++; level.found_items++;
bCOUNTITEM = false; bCOUNTITEM = false;
} }
if ( bCOUNTSECRET ) if ( bCOUNTSECRET )
{ {
user.GiveSecret(); if ( target ) target.GiveSecret();
else level.found_secrets++;
bCOUNTSECRET = false; bCOUNTSECRET = false;
} }
if ( special ) if ( special )
{ {
user.A_CallSpecial(special,args[0],args[1],args[2],args[3],args[4]); if ( target ) target.A_CallSpecial(special,args[0],args[1],args[2],args[3],args[4]);
else level.ExecuteSpecial(special,null,null,false,args[0],args[1],args[2],args[3],args[4]);
special = 0; special = 0;
} }
} }