Sniper navbot: Use melee if enemy is near
This commit is contained in:
parent
7e48bca697
commit
5abc786fa8
@ -1400,7 +1400,9 @@ static slots getBestSlot(slots active_slot, std::pair<CachedEntity *, float> &ne
|
||||
if (HasWeapon(LOCAL_E, 56) || HasWeapon(LOCAL_E, 1005) || HasWeapon(LOCAL_E, 1092))
|
||||
return primary;
|
||||
|
||||
if (nearest.second <= 300 && nearest.first->m_iHealth() < 75)
|
||||
if (nearest.second <= 200)
|
||||
return melee;
|
||||
else if (nearest.second <= 300 && nearest.first->m_iHealth() < 75)
|
||||
return secondary;
|
||||
else if (nearest.second <= 400 && nearest.first->m_iHealth() < 75)
|
||||
return active_slot;
|
||||
|
Reference in New Issue
Block a user