nav: do not switch back to primary weapon, if escaping from bomb

revert: some of thread-workers stuff done previous commits due to stability issues
This commit is contained in:
jeefo 2023-07-02 19:25:18 +03:00
commit bb6117feb0
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
6 changed files with 36 additions and 46 deletions

View file

@ -901,7 +901,7 @@ bool Bot::updateNavigation () {
// pressing the jump button gives the illusion of the bot actual jumping.
if (isOnFloor () || isOnLadder ()) {
if (m_desiredVelocity.length2d () > 0.0f) {
pev->velocity = m_desiredVelocity;
pev->velocity = m_desiredVelocity + m_desiredVelocity * m_frameInterval;
}
else {
auto feet = pev->origin + pev->mins;
@ -943,7 +943,7 @@ bool Bot::updateNavigation () {
}
}
}
else if (!cv_jasonmode.bool_ () && usesKnife () && isOnFloor ()) {
else if (!cv_jasonmode.bool_ () && usesKnife () && isOnFloor () && getCurrentTaskId () != Task::EscapeFromBomb) {
selectBestWeapon ();
}
}