fix: bots on csdm never respawning thus never resets their states (fixes #459)
This commit is contained in:
parent
b38c29af84
commit
5a2d0748c0
2 changed files with 5 additions and 6 deletions
|
|
@ -86,12 +86,6 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
|
||||||
// Spawn() function is one of the functions any entity is supposed to have in the game DLL,
|
// Spawn() function is one of the functions any entity is supposed to have in the game DLL,
|
||||||
// and any MOD is supposed to implement one for each of its entities.
|
// and any MOD is supposed to implement one for each of its entities.
|
||||||
|
|
||||||
auto bot = bots[ent];
|
|
||||||
|
|
||||||
if (bot) {
|
|
||||||
bot->spawned ();
|
|
||||||
}
|
|
||||||
|
|
||||||
// precache everything
|
// precache everything
|
||||||
game.precache ();
|
game.precache ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1263,6 +1263,11 @@ void BotManager::handleDeath (edict_t *killer, edict_t *victim) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mark bot as "spawned", and reset it to new-round state when it dead (for csdm only)
|
||||||
|
if (victimBot != nullptr) {
|
||||||
|
victimBot->spawned ();
|
||||||
|
}
|
||||||
|
|
||||||
// is this message about a bot who killed somebody?
|
// is this message about a bot who killed somebody?
|
||||||
if (killerBot != nullptr) {
|
if (killerBot != nullptr) {
|
||||||
killerBot->m_lastVictim = victim;
|
killerBot->m_lastVictim = victim;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue