From 7b073aedb8d4cb15aa1272b4b544ce7c1f56c408 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 30 Aug 2020 23:12:28 -0700 Subject: [PATCH] Fix NPC softlock (cannon and hoot) Bug reported by somario360: When trying to open the cannon in a level (so far tested in BOB & WF) the cannon dialogue will repeat infinitely. Sometimes the cannon will open, but the game will crash after. The code I had written previously to prevent softlocks ended up causing them due to a incorrect check of activeFlags. --- src/game/mario_actions_cutscene.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 78b7e91d5..65a59558c 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -396,7 +396,7 @@ s32 act_reading_npc_dialog(struct MarioState *m) { s16 angleToNPC; if (m->playerIndex == 0) { - if (m->usedObj == NULL || m->usedObj->activeFlags != ACTIVE_FLAG_DEACTIVATED || m->usedObj->behavior != localDialogNPCBehavior) { + if (m->usedObj == NULL || m->usedObj->activeFlags == ACTIVE_FLAG_DEACTIVATED || m->usedObj->behavior != localDialogNPCBehavior) { set_mario_npc_dialog(m, 0); } }