- Moved bot thinking logic into DBot.
This commit is contained in:
parent
5e6c375974
commit
ee977f94d7
12 changed files with 153 additions and 135 deletions
|
|
@ -1021,11 +1021,14 @@ 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
|
||||
for (int i = 0; i < MAXPLAYERS; i++)
|
||||
while ((Bot = it.Next ()) != NULL)
|
||||
{
|
||||
if (playeringame[i] && players[i].Bot != NULL && this == players[i].Bot->dest)
|
||||
players[i].Bot->dest = NULL;
|
||||
if (Bot->dest == this)
|
||||
Bot->dest = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue