fix: missing world time when surprising enemies (ref #534)
This commit is contained in:
parent
7fa4cc5f70
commit
cbcb4a7ff0
2 changed files with 2 additions and 1 deletions
|
|
@ -389,6 +389,7 @@ bool Bot::lookupEnemies () {
|
||||||
else {
|
else {
|
||||||
m_enemySurpriseTime = m_actualReactionTime;
|
m_enemySurpriseTime = m_actualReactionTime;
|
||||||
}
|
}
|
||||||
|
m_enemySurpriseTime += game.time ();
|
||||||
|
|
||||||
// zero out reaction time
|
// zero out reaction time
|
||||||
m_actualReactionTime = 0.0f;
|
m_actualReactionTime = 0.0f;
|
||||||
|
|
|
||||||
|
|
@ -1354,7 +1354,7 @@ void BotManager::handleDeath (edict_t *killer, edict_t *victim) {
|
||||||
&& game.isNullEntity (notify->m_lastEnemy)
|
&& game.isNullEntity (notify->m_lastEnemy)
|
||||||
&& util.isVisible (killer->v.origin, notify->ent ())) {
|
&& util.isVisible (killer->v.origin, notify->ent ())) {
|
||||||
|
|
||||||
// make bot look at last e nemy position
|
// make bot look at last enemy position
|
||||||
notify->m_actualReactionTime = 0.0f;
|
notify->m_actualReactionTime = 0.0f;
|
||||||
notify->m_seeEnemyTime = game.time ();
|
notify->m_seeEnemyTime = game.time ();
|
||||||
notify->m_enemy = killer;
|
notify->m_enemy = killer;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue