Do not access engine functions inside bot's destructors.

This commit is contained in:
jeefo 2016-11-04 13:04:17 +03:00
commit a3cc619a5c
2 changed files with 3 additions and 2 deletions

View file

@ -1127,7 +1127,10 @@ void ClientDisconnect (edict_t *ent)
// check if its a bot
if (bot != nullptr && bot->pev == &ent->v)
{
bot->EnableChatterIcon (false);
bots.Free (index);
}
bots.AdjustQuota (false, ent);

View file

@ -1040,9 +1040,7 @@ Bot::~Bot (void)
{
// this is bot destructor
EnableChatterIcon (false);
ReleaseUsedName ();
DeleteSearchNodes ();
ResetTasks ();
}