Avoid speaking the same wingmate twice, if possible.

This commit is contained in:
Steve 2016-05-05 12:47:19 +01:00
parent 55462db981
commit ac78f83d43
1 changed files with 5 additions and 2 deletions

View File

@ -25,11 +25,14 @@ static void nextMessage(void);
static MessageBox head;
static MessageBox *tail;
static Entity *lastWingmate;
void initMessageBox(void)
{
memset(&head, 0, sizeof(MessageBox));
tail = &head;
lastWingmate = NULL;
}
void addMessageBox(char *title, char *body, int important)
@ -170,9 +173,9 @@ static void nextMessage(void)
{
wingmate = e;
if (rand() % 2)
if (rand() % 2 && e != lastWingmate)
{
battle.messageSpeaker = e;
battle.messageSpeaker = lastWingmate = e;
return;
}
}