Remove calls to lag compensation when its not needed anymore

This commit is contained in:
Kamay Xutax 2024-09-09 21:10:29 +02:00
parent 0ac73ae6e8
commit 1dc0c5c414
8 changed files with 0 additions and 66 deletions

View file

@ -585,9 +585,6 @@ void CHL2MP_Player::PlayerDeathThink()
void CHL2MP_Player::FireBullets ( const FireBulletsInfo_t &info )
{
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( this, this->GetCurrentCommand() );
FireBulletsInfo_t modinfo = info;
CWeaponHL2MPBase *pWeapon = dynamic_cast<CWeaponHL2MPBase *>( GetActiveWeapon() );
@ -600,9 +597,6 @@ void CHL2MP_Player::FireBullets ( const FireBulletsInfo_t &info )
NoteWeaponFired();
BaseClass::FireBullets( modinfo );
// Move other players back to history positions based on local player's lag
lagcompensation->FinishLagCompensation( this );
}
void CHL2MP_Player::NoteWeaponFired( void )

View file

@ -219,14 +219,7 @@ void CKnife::PrimaryAttack()
CCSPlayer *pPlayer = GetPlayerOwner();
if ( pPlayer )
{
#if !defined (CLIENT_DLL)
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( pPlayer, pPlayer->GetCurrentCommand() );
#endif
SwingOrStab( false );
#if !defined (CLIENT_DLL)
lagcompensation->FinishLagCompensation( pPlayer );
#endif
}
}

View file

@ -242,11 +242,6 @@ void FX_FireBullets(
StartGroupingSounds();
#if !defined (CLIENT_DLL)
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( pPlayer, pPlayer->GetCurrentCommand() );
#endif
RandomSeed( iSeed );
float x, y;
@ -361,10 +356,6 @@ void FX_FireBullets(
}
#endif
#if !defined (CLIENT_DLL)
lagcompensation->FinishLagCompensation( pPlayer );
#endif
EndGroupingSounds();
}

View file

@ -902,11 +902,6 @@ CBaseEntity *CWeaponDODBase::MeleeAttack( int iDamageAmount, int iDamageType, fl
CDODPlayer *pPlayer = ToDODPlayer( GetPlayerOwner() );
#if !defined (CLIENT_DLL)
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( pPlayer, pPlayer->GetCurrentCommand() );
#endif
Vector vForward, vRight, vUp;
AngleVectors( pPlayer->EyeAngles(), &vForward, &vRight, &vUp );
Vector vecSrc = pPlayer->Weapon_ShootPosition();
@ -993,8 +988,6 @@ CBaseEntity *CWeaponDODBase::MeleeAttack( int iDamageAmount, int iDamageType, fl
gameeventmanager->FireEvent( event );
}
lagcompensation->FinishLagCompensation( pPlayer );
#endif //CLIENT_DLL
return tr.m_pEnt;

View file

@ -99,11 +99,6 @@ CBaseEntity *CWeaponDODBaseMelee::MeleeAttack( int iDamageAmount, int iDamageTyp
CDODPlayer *pPlayer = ToDODPlayer( GetPlayerOwner() );
#if !defined (CLIENT_DLL)
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( pPlayer, pPlayer->GetCurrentCommand() );
#endif
Vector vForward, vRight, vUp;
AngleVectors( pPlayer->EyeAngles(), &vForward, &vRight, &vUp );
Vector vecSrc = pPlayer->Weapon_ShootPosition();
@ -230,7 +225,6 @@ CBaseEntity *CWeaponDODBaseMelee::MeleeAttack( int iDamageAmount, int iDamageTyp
gameeventmanager->FireEvent( event );
}
lagcompensation->FinishLagCompensation( pPlayer );
#endif //CLIENT_DLL
return tr.m_pEnt;

View file

@ -101,18 +101,7 @@ void CBaseHL2MPBludgeonWeapon::ItemPostFrame( void )
//------------------------------------------------------------------------------
void CBaseHL2MPBludgeonWeapon::PrimaryAttack()
{
#ifndef CLIENT_DLL
CHL2MP_Player *pPlayer = ToHL2MPPlayer( GetPlayerOwner() );
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( pPlayer, pPlayer->GetCurrentCommand() );
#endif
Swing( false );
#ifndef CLIENT_DLL
// Move other players back to history positions based on local player's lag
lagcompensation->FinishLagCompensation( pPlayer );
#endif
}
//------------------------------------------------------------------------------

View file

@ -188,11 +188,6 @@ void FX_FireBullets(
StartGroupingSounds();
#if !defined (CLIENT_DLL)
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( pPlayer, pPlayer->GetCurrentCommand() );
#endif
for ( int iBullet=0; iBullet < pWeaponInfo->m_iBullets; iBullet++ )
{
RandomSeed( iSeed ); // init random system with this seed
@ -215,10 +210,6 @@ void FX_FireBullets(
x,y );
}
#if !defined (CLIENT_DLL)
lagcompensation->FinishLagCompensation( pPlayer );
#endif
EndGroupingSounds();
}

View file

@ -100,18 +100,7 @@ void CWeaponSDKMelee::ItemPostFrame( void )
//------------------------------------------------------------------------------
void CWeaponSDKMelee::PrimaryAttack()
{
#ifndef CLIENT_DLL
CSDKPlayer *pPlayer = ToSDKPlayer( GetPlayerOwner() );
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( pPlayer, pPlayer->GetCurrentCommand() );
#endif
Swing( false );
#ifndef CLIENT_DLL
// Move other players back to history positions based on local player's lag
lagcompensation->FinishLagCompensation( pPlayer );
#endif
}
//------------------------------------------------------------------------------