- Changed TThinkerIterator loops back to MAXPLAYERS loops.

- Added STAT_BOT.
This commit is contained in:
ChillyDoom 2014-11-15 08:58:29 +00:00
commit e38aee070c
7 changed files with 56 additions and 62 deletions

View file

@ -1021,14 +1021,11 @@ void AInventory::Touch (AActor *toucher)
P_GiveSecret(toucher, true, true, -1);
}
DBot *Bot;
TThinkerIterator<DBot> it;
//Added by MC: Check if item taken was the roam destination of any bot
while ((Bot = it.Next ()) != NULL)
for (int i = 0; i < MAXPLAYERS; i++)
{
if (Bot->dest == this)
Bot->dest = NULL;
if (players[i].Bot != NULL && this == players[i].Bot->dest)
players[i].Bot->dest = NULL;
}
}