fix: flaws in previous commit
This commit is contained in:
parent
50aecc1332
commit
11c5e045d1
1 changed files with 27 additions and 31 deletions
|
|
@ -761,23 +761,19 @@ bool Bot::updateNavigation () {
|
|||
m_enemy = client.ent;
|
||||
m_lastEnemy = client.ent;
|
||||
m_lastEnemyOrigin = client.ent->v.origin;
|
||||
|
||||
m_enemyParts = Visibility::None;
|
||||
m_enemyParts = Visibility::Head;
|
||||
m_enemyParts = Visibility::Body;
|
||||
m_enemyParts |= (Visibility::Head | Visibility::Body);
|
||||
|
||||
m_states |= Sense::SeeingEnemy;
|
||||
m_seeEnemyTime = game.time ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (graph.exists (m_previousNodes[0])) {
|
||||
getEyesPos () = graph[m_previousNodes[0]].origin;
|
||||
}
|
||||
else {
|
||||
game.testHull (getEyesPos (), m_path->origin, TraceIgnore::Monsters, pev->flags & FL_DUCKING ? head_hull : human_hull, ent (), &tr);
|
||||
|
||||
// someone is above or below us
|
||||
// and is using the ladder already
|
||||
// someone is above or below us and is using the ladder already
|
||||
if (tr.pHit == client.ent && cr::abs (pev->origin.z - client.ent->v.origin.z) > 15.0f && (client.ent->v.movetype == MOVETYPE_FLY)) {
|
||||
if (graph.exists (m_previousNodes[0])) {
|
||||
if (!(graph[m_previousNodes[0]].flags & NodeFlag::Ladder)) {
|
||||
|
|
@ -813,7 +809,7 @@ bool Bot::updateNavigation () {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue