Predict shared thinks in server order

This commit is contained in:
ficool2
2025-11-01 12:47:18 +00:00
committed by EricS-Valve
parent 90554c0480
commit 1fe7e011bf
3 changed files with 19 additions and 4 deletions
+16
View File
@@ -5886,6 +5886,17 @@ bool C_TFPlayer::IsPlayerOnSteamFriendsList( C_BasePlayer *pPlayer )
return false; return false;
} }
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void C_TFPlayer::PreThink( void )
{
// Update timers.
UpdateTimers();
// Pass through to the base class think.
BaseClass::PreThink();
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:
@@ -6091,6 +6102,11 @@ void C_TFPlayer::ClientThink()
} }
} }
void C_TFPlayer::UpdateTimers( void )
{
m_Shared.SharedThink();
}
void C_TFPlayer::Touch( CBaseEntity *pOther ) void C_TFPlayer::Touch( CBaseEntity *pOther )
{ {
BaseClass::Touch( pOther ); BaseClass::Touch( pOther );
+3
View File
@@ -111,8 +111,11 @@ public:
void StopViewModelParticles( C_BaseEntity *pParticleEnt ); void StopViewModelParticles( C_BaseEntity *pParticleEnt );
virtual void PreThink( void );
virtual void ClientThink(); virtual void ClientThink();
void UpdateTimers();
// Deal with recording // Deal with recording
virtual void GetToolRecordingState( KeyValues *msg ); virtual void GetToolRecordingState( KeyValues *msg );
-4
View File
@@ -1420,8 +1420,6 @@ void CTFPlayerShared::OnPreDataChanged( void )
m_nOldDisguiseClass = GetDisguiseClass(); m_nOldDisguiseClass = GetDisguiseClass();
m_nOldDisguiseTeam = GetDisguiseTeam(); m_nOldDisguiseTeam = GetDisguiseTeam();
m_iOldMovementStunParity = m_iMovementStunParity; m_iOldMovementStunParity = m_iMovementStunParity;
SharedThink();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1483,8 +1481,6 @@ void CTFPlayerShared::OnDataChanged( void )
{ {
GetActiveTFWeapon()->SetWeaponVisible( false ); GetActiveTFWeapon()->SetWeaponVisible( false );
} }
InvisibilityThink();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------