From ec8482aef72148dc82420e8fbf1474f078a1e27e Mon Sep 17 00:00:00 2001 From: Night Owl Date: Thu, 25 Oct 2018 20:17:38 +0500 Subject: [PATCH] Fix timers. --- dlls/gauss.cpp | 4 ++-- dlls/glock.cpp | 2 +- dlls/satchel.cpp | 6 +++--- dlls/shotgun.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp index 34a514b6..875c9b96 100644 --- a/dlls/gauss.cpp +++ b/dlls/gauss.cpp @@ -150,7 +150,7 @@ void CXS::PrimaryAttack() if( m_pPlayer->pev->waterlevel == 3 ) { PlayEmptySound(); - m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay( 0.15 ); + m_flNextSecondaryAttack = m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; return; } @@ -188,7 +188,7 @@ void CXS::SecondaryAttack() PlayEmptySound(); } - m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); + m_flNextSecondaryAttack = m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; return; } diff --git a/dlls/glock.cpp b/dlls/glock.cpp index c70d8e40..aac656b8 100644 --- a/dlls/glock.cpp +++ b/dlls/glock.cpp @@ -205,7 +205,7 @@ void CGlock::GlockFire( float flCycleTime, BOOL fUseAutoAim ) pNail->pev->speed = 1600.0f; pNail->pev->avelocity.z = 10; - m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay( flCycleTime ); + m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime; if( m_fInAttack ) { diff --git a/dlls/satchel.cpp b/dlls/satchel.cpp index 4cc4ad6a..563c7bc7 100644 --- a/dlls/satchel.cpp +++ b/dlls/satchel.cpp @@ -367,7 +367,7 @@ void CPipebomb::PrimaryAttack() } m_chargeReady = SATCHEL_RELOAD; - m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5; break; @@ -416,7 +416,7 @@ void CPipebomb::Throw( void ) m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--; - m_flNextPrimaryAttack = GetNextAttackDelay( 1.0 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.0; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; } } @@ -457,7 +457,7 @@ void CPipebomb::WeaponIdle( void ) // use tripmine animations strcpy( m_pPlayer->m_szAnimExtention, "trip" ); - m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_chargeReady = SATCHEL_IDLE; break; diff --git a/dlls/shotgun.cpp b/dlls/shotgun.cpp index ba08f6f8..7f2cdd67 100644 --- a/dlls/shotgun.cpp +++ b/dlls/shotgun.cpp @@ -118,7 +118,7 @@ void CShotgun::PrimaryAttack() if( m_pPlayer->pev->waterlevel == 3 ) { PlayEmptySound(); - m_flNextPrimaryAttack = GetNextAttackDelay( 0.15 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; return; }