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 0944ec12ce
5 changed files with 0 additions and 38 deletions

View file

@ -219,14 +219,7 @@ void CKnife::PrimaryAttack()
CCSPlayer *pPlayer = GetPlayerOwner(); CCSPlayer *pPlayer = GetPlayerOwner();
if ( pPlayer ) 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 ); SwingOrStab( false );
#if !defined (CLIENT_DLL)
lagcompensation->FinishLagCompensation( pPlayer );
#endif
} }
} }

View file

@ -242,11 +242,6 @@ void FX_FireBullets(
StartGroupingSounds(); 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 ); RandomSeed( iSeed );
float x, y; float x, y;
@ -361,10 +356,6 @@ void FX_FireBullets(
} }
#endif #endif
#if !defined (CLIENT_DLL)
lagcompensation->FinishLagCompensation( pPlayer );
#endif
EndGroupingSounds(); EndGroupingSounds();
} }

View file

@ -902,11 +902,6 @@ CBaseEntity *CWeaponDODBase::MeleeAttack( int iDamageAmount, int iDamageType, fl
CDODPlayer *pPlayer = ToDODPlayer( GetPlayerOwner() ); 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; Vector vForward, vRight, vUp;
AngleVectors( pPlayer->EyeAngles(), &vForward, &vRight, &vUp ); AngleVectors( pPlayer->EyeAngles(), &vForward, &vRight, &vUp );
Vector vecSrc = pPlayer->Weapon_ShootPosition(); Vector vecSrc = pPlayer->Weapon_ShootPosition();
@ -993,8 +988,6 @@ CBaseEntity *CWeaponDODBase::MeleeAttack( int iDamageAmount, int iDamageType, fl
gameeventmanager->FireEvent( event ); gameeventmanager->FireEvent( event );
} }
lagcompensation->FinishLagCompensation( pPlayer );
#endif //CLIENT_DLL #endif //CLIENT_DLL
return tr.m_pEnt; return tr.m_pEnt;

View file

@ -99,11 +99,6 @@ CBaseEntity *CWeaponDODBaseMelee::MeleeAttack( int iDamageAmount, int iDamageTyp
CDODPlayer *pPlayer = ToDODPlayer( GetPlayerOwner() ); 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; Vector vForward, vRight, vUp;
AngleVectors( pPlayer->EyeAngles(), &vForward, &vRight, &vUp ); AngleVectors( pPlayer->EyeAngles(), &vForward, &vRight, &vUp );
Vector vecSrc = pPlayer->Weapon_ShootPosition(); Vector vecSrc = pPlayer->Weapon_ShootPosition();
@ -230,7 +225,6 @@ CBaseEntity *CWeaponDODBaseMelee::MeleeAttack( int iDamageAmount, int iDamageTyp
gameeventmanager->FireEvent( event ); gameeventmanager->FireEvent( event );
} }
lagcompensation->FinishLagCompensation( pPlayer );
#endif //CLIENT_DLL #endif //CLIENT_DLL
return tr.m_pEnt; return tr.m_pEnt;

View file

@ -188,11 +188,6 @@ void FX_FireBullets(
StartGroupingSounds(); 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++ ) for ( int iBullet=0; iBullet < pWeaponInfo->m_iBullets; iBullet++ )
{ {
RandomSeed( iSeed ); // init random system with this seed RandomSeed( iSeed ); // init random system with this seed
@ -215,10 +210,6 @@ void FX_FireBullets(
x,y ); x,y );
} }
#if !defined (CLIENT_DLL)
lagcompensation->FinishLagCompensation( pPlayer );
#endif
EndGroupingSounds(); EndGroupingSounds();
} }