mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
add source-sdk-2013
This commit is contained in:
@@ -172,7 +172,6 @@ class CLagCompensationManager : public CAutoGameSystemPerFrame, public ILagCompe
|
||||
public:
|
||||
CLagCompensationManager( char const *name ) : CAutoGameSystemPerFrame( name ), m_flTeleportDistanceSqr( 64 *64 )
|
||||
{
|
||||
m_isCurrentlyDoingCompensation = false;
|
||||
}
|
||||
|
||||
// IServerSystem stuff
|
||||
@@ -195,8 +194,6 @@ public:
|
||||
void StartLagCompensation( CBasePlayer *player, CUserCmd *cmd );
|
||||
void FinishLagCompensation( CBasePlayer *player );
|
||||
|
||||
bool IsCurrentlyDoingLagCompensation() const OVERRIDE { return m_isCurrentlyDoingCompensation; }
|
||||
|
||||
private:
|
||||
void BacktrackPlayer( CBasePlayer *player, float flTargetTime );
|
||||
|
||||
@@ -219,8 +216,6 @@ private:
|
||||
CBasePlayer *m_pCurrentPlayer; // The player we are doing lag compensation for
|
||||
|
||||
float m_flTeleportDistanceSqr;
|
||||
|
||||
bool m_isCurrentlyDoingCompensation; // Sentinel to prevent calling StartLagCompensation a second time before a Finish.
|
||||
};
|
||||
|
||||
static CLagCompensationManager g_LagCompensationManager( "CLagCompensationManager" );
|
||||
@@ -327,8 +322,6 @@ void CLagCompensationManager::FrameUpdatePostEntityThink()
|
||||
// Called during player movement to set up/restore after lag compensation
|
||||
void CLagCompensationManager::StartLagCompensation( CBasePlayer *player, CUserCmd *cmd )
|
||||
{
|
||||
Assert( !m_isCurrentlyDoingCompensation );
|
||||
|
||||
//DONT LAG COMP AGAIN THIS FRAME IF THERES ALREADY ONE IN PROGRESS
|
||||
//IF YOU'RE HITTING THIS THEN IT MEANS THERES A CODE BUG
|
||||
if ( m_pCurrentPlayer )
|
||||
@@ -357,8 +350,6 @@ void CLagCompensationManager::StartLagCompensation( CBasePlayer *player, CUserCm
|
||||
Q_memset( m_RestoreData, 0, sizeof( m_RestoreData ) );
|
||||
Q_memset( m_ChangeData, 0, sizeof( m_ChangeData ) );
|
||||
|
||||
m_isCurrentlyDoingCompensation = true;
|
||||
|
||||
// Get true latency
|
||||
|
||||
// correct is the amout of time we have to correct game time
|
||||
@@ -743,10 +734,7 @@ void CLagCompensationManager::FinishLagCompensation( CBasePlayer *player )
|
||||
m_pCurrentPlayer = NULL;
|
||||
|
||||
if ( !m_bNeedToRestore )
|
||||
{
|
||||
m_isCurrentlyDoingCompensation = false;
|
||||
return; // no player was changed at all
|
||||
}
|
||||
|
||||
// Iterate all active players
|
||||
for ( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||
@@ -840,8 +828,6 @@ void CLagCompensationManager::FinishLagCompensation( CBasePlayer *player )
|
||||
pPlayer->SetSimulationTime( restore->m_flSimulationTime );
|
||||
}
|
||||
}
|
||||
|
||||
m_isCurrentlyDoingCompensation = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user