Check for reload when hiding.
This commit is contained in:
parent
9eaca5a27b
commit
2eef246e97
2 changed files with 5 additions and 1 deletions
|
|
@ -3728,6 +3728,10 @@ void Bot::hide_ (void) {
|
|||
pev->button |= m_campButtons;
|
||||
m_navTimeset = engine.timebase ();
|
||||
|
||||
if (!m_isReloading) {
|
||||
checkReload ();
|
||||
}
|
||||
|
||||
// stop camping if time over or gets hurt by something else than bullets
|
||||
if (task ()->time < engine.timebase () || m_lastDamageType > 0) {
|
||||
completeTask ();
|
||||
|
|
|
|||
|
|
@ -2368,7 +2368,7 @@ bool Bot::advanceMovement (void) {
|
|||
}
|
||||
|
||||
// is there a jump waypoint right ahead and do we need to draw out the light weapon ?
|
||||
if (willJump && m_currentWeapon != WEAPON_KNIFE && m_currentWeapon != WEAPON_SCOUT && !m_isReloading && !usesPistol () && (jumpDistance > 210.0f || (dst.z - 32.0f > src.z && jumpDistance > 150.0f)) && !(m_states & (STATE_SEEING_ENEMY | STATE_SUSPECT_ENEMY))) {
|
||||
if (willJump && m_currentWeapon != WEAPON_KNIFE && m_currentWeapon != WEAPON_SCOUT && !m_isReloading && !usesPistol () && (jumpDistance > 200.0f || (dst.z - 32.0f > src.z && jumpDistance > 150.0f)) && !(m_states & (STATE_SEEING_ENEMY | STATE_SUSPECT_ENEMY))) {
|
||||
selectWeaponByName ("weapon_knife"); // draw out the knife if we needed
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue