fix: attack movement with knives

This commit is contained in:
jeefo 2024-02-01 08:08:00 +03:00
commit e1777b900f
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -1326,7 +1326,9 @@ void Bot::attackMovement () {
}
// we're setting strafe speed regardless of move angles, so not resetting forward move here cause bots to behave strange
m_moveSpeed = 0.0f;
if (!usesKnife ()) {
m_moveSpeed = 0.0f;
}
if (m_difficulty >= Difficulty::Normal && (m_jumpTime + 5.0f < game.time () && isOnFloor () && rg.get (0, 1000) < (m_isReloading ? 8 : 2) && pev->velocity.length2d () > 150.0f) && !usesSniper ()) {
pev->button |= IN_JUMP;