port: fix (?) crash related to knocking out the secretary in defection

This commit is contained in:
fgsfds committed 2023-08-11 00:02:59 +02:00
1 parent 25d9e4a195
commit 6396b38a6f
1 file changed
+6
+6
View File
@@ -8490,6 +8490,12 @@ void chrTickDruggedComingUp(struct chrdata *chr)
chrUncloak(chr, true);
chr->actiontype = ACT_DRUGGEDDROP;
#ifdef AVOID_UB
// the function that checks notifychrindex checks for ACT_DRUGGEDDROP,
// so in theory it could check it before the drop animation is finished,
// which will cause a crash. or at least I think that's what's happening
chr->act_die.notifychrindex = 0;
#endif
while (!done) {
if (i >= 0