fix: bot is marked as stale when not needed

bot: port enemy noticeable function from regamedll
This commit is contained in:
jeefo 2023-05-07 01:04:09 +03:00
commit 2b2b82ee13
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
6 changed files with 122 additions and 28 deletions

View file

@ -795,6 +795,8 @@ CR_EXPORT int GetNewDLLFunctions (newgamefuncs_t *table, int *interfaceVersion)
if (bot->m_enemy == ent) {
bot->m_enemy = nullptr;
bot->m_lastEnemy = nullptr;
}
else if (bot->ent () == ent) {
bot->markStale ();
}
}