From bd5f1c3b49c0e41c8f8fe3bfef611c57978b09f8 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 19 Dec 2015 08:56:52 +0000 Subject: [PATCH] Don't execute scripts or message boxes if the player is dead. --- src/battle/battle.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/battle/battle.c b/src/battle/battle.c index ead67a0..b8ca07d 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -145,11 +145,17 @@ static void doBattle(void) doPlayer(); - doMessageBox(); + if (player != NULL) + { + doMessageBox(); + } if (battle.status == MS_IN_PROGRESS) { - doScript(); + if (player != NULL) + { + doScript(); + } } else { @@ -190,7 +196,10 @@ static void draw(void) drawHud(); - drawMessageBox(); + if (player != NULL) + { + drawMessageBox(); + } drawMissionInfo();