diff --git a/src/battle/messageBox.c b/src/battle/messageBox.c index 10f029f..1cfff88 100644 --- a/src/battle/messageBox.c +++ b/src/battle/messageBox.c @@ -148,9 +148,12 @@ void drawMessageBox(void) static void nextMessage(void) { Entity *e, *wingmate; + int isWingmate; wingmate = NULL; + isWingmate = strcmp(head.next->title, "Wingmate") == 0; + playSound(SND_RADIO); for (e = battle.entityHead.next ; e != NULL ; e = e->next) @@ -163,7 +166,7 @@ static void nextMessage(void) return; } - if (strcmp(head.next->title, "Wingmate") == 0 && e->type == ET_FIGHTER && e->speed > 0) + if (isWingmate && e->type == ET_FIGHTER && e->speed > 0) { wingmate = e;