fix: do not apply knife mode if we're just have knife in hands

nav: increase search radius in checking node reachability
This commit is contained in:
jeefo 2023-04-13 21:12:49 +03:00
commit 5bc4e1c675
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
2 changed files with 3 additions and 3 deletions

View file

@ -1567,7 +1567,7 @@ void Bot::overrideConditions () {
}
// special handling, if we have a knife in our hands
if ((usesKnife () || !hasAnyWeapons ()) && (util.isPlayer (m_enemy) || (cv_attack_monsters.bool_ () && util.isMonster (m_enemy)))) {
if (isKnifeMode () && (util.isPlayer (m_enemy) || (cv_attack_monsters.bool_ () && util.isMonster (m_enemy)))) {
float length = pev->origin.distance2d (m_enemy->v.origin);
// do waypoint movement if enemy is not reachable with a knife