Browse Source

disable rock prediction

clcampaign
root 6 years ago
parent
commit
7a50a35cbf
  1. 24
      dlls/rock.cpp

24
dlls/rock.cpp

@ -46,14 +46,7 @@ public: @@ -46,14 +46,7 @@ public:
BOOL Deploy( void );
void WeaponIdle( void );
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
return TRUE;
#else
return FALSE;
#endif
}
virtual BOOL UseDecrement( void ){ return FALSE; }
};
@ -97,7 +90,7 @@ int CRock::GetItemInfo( ItemInfo *p ) @@ -97,7 +90,7 @@ int CRock::GetItemInfo( ItemInfo *p )
BOOL CRock::Deploy()
{
return DefaultDeploy( "models/v_rock.mdl", "models/p_rock.mdl", PEPSIGUN_DRAW, "PEPSIGUN" );
return DefaultDeploy( "models/v_rock.mdl", "models/p_rock.mdl", PEPSIGUN_DRAW, "crowbar" );
}
void CRock::PrimaryAttack()
@ -114,7 +107,6 @@ void CRock::PrimaryAttack() @@ -114,7 +107,6 @@ void CRock::PrimaryAttack()
flVel = 1300;
UTIL_MakeVectors( angThrow );
Vector vecSrc = m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16;
Vector vecThrow = gpGlobals->v_forward * flVel + m_pPlayer->pev->velocity;
@ -122,9 +114,9 @@ void CRock::PrimaryAttack() @@ -122,9 +114,9 @@ void CRock::PrimaryAttack()
SendWeaponAnim( PEPSIGUN_THROW );
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5;
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.75;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.75;
m_flNextPrimaryAttack = gpGlobals->time + 0.5;
m_flNextSecondaryAttack = gpGlobals->time + 0.75;
m_flTimeWeaponIdle = gpGlobals->time + 0.75;
m_fInSpecialReload = 0;
}
@ -140,7 +132,7 @@ void CRock::WeaponIdle( void ) @@ -140,7 +132,7 @@ void CRock::WeaponIdle( void )
m_flPumpTime = 0;
}
if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )
if( m_flTimeWeaponIdle < gpGlobals->time )
{
if( m_iClip == 0 && m_fInSpecialReload == 0 && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] )
{
@ -155,7 +147,7 @@ void CRock::WeaponIdle( void ) @@ -155,7 +147,7 @@ void CRock::WeaponIdle( void )
else
{
m_fInSpecialReload = 0;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5;
m_flTimeWeaponIdle = gpGlobals->time + 1.5;
}
}
else
@ -164,7 +156,7 @@ void CRock::WeaponIdle( void ) @@ -164,7 +156,7 @@ void CRock::WeaponIdle( void )
float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 );
iAnim = PEPSIGUN_IDLE;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + ( 20.0 / 9.0 );
m_flTimeWeaponIdle = gpGlobals->time + ( 20.0 / 9.0 );
SendWeaponAnim( iAnim );
}
}

Loading…
Cancel
Save