fix: crash on predicted node index use after wiped
refactor: reworked prediction to calc prediction for all bots at one job, instead of firing it for every bot
This commit is contained in:
parent
5ce2032acd
commit
93d9187f6d
12 changed files with 205 additions and 182 deletions
|
|
@ -212,7 +212,7 @@ bool Bot::seesEnemy (edict_t *player) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (isEnemyInFrustum (player) && isInViewCone (player->v.origin) && checkBodyParts (player)) {
|
||||
if (isInViewCone (player->v.origin) && frustum.check (m_viewFrustum, player) && checkBodyParts (player)) {
|
||||
m_seeEnemyTime = game.time ();
|
||||
m_lastEnemy = player;
|
||||
m_lastEnemyOrigin = m_enemyOrigin;
|
||||
|
|
@ -277,7 +277,7 @@ bool Bot::lookupEnemies () {
|
|||
}
|
||||
|
||||
// check the engine PVS
|
||||
if (!isEnemyInFrustum (interesting) || !game.checkVisibility (interesting, set)) {
|
||||
if (!frustum.check (m_viewFrustum, interesting) || !game.checkVisibility (interesting, set)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ bool Bot::lookupEnemies () {
|
|||
player = client.ent;
|
||||
|
||||
// check the engine PVS
|
||||
if (!isEnemyInFrustum (player) || !game.checkVisibility (player, set)) {
|
||||
if (!frustum.check (m_viewFrustum, player) || !game.checkVisibility (player, set)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue