Always send animtime

This commit is contained in:
Kamay Xutax 2024-04-03 00:35:48 +02:00
parent 2cc7a749a2
commit 35325f3177

View file

@ -97,19 +97,6 @@ bool CBaseEntity::s_bAbsQueriesValid = true;
ConVar sv_netvisdist( "sv_netvisdist", "10000", FCVAR_CHEAT | FCVAR_DEVELOPMENTONLY, "Test networking visibility distance" );
void* SendProxy_ClientSideAnimation( const SendProp *pProp, const void *pStruct, const void *pVarData, CSendProxyRecipients *pRecipients, int objectID )
{
CBaseEntity *pEntity = (CBaseEntity *)pStruct;
CBaseAnimating *pAnimating = pEntity->GetBaseAnimating();
if ( pAnimating && !pAnimating->IsUsingClientSideAnimation() )
return (void*)pVarData;
else
return NULL; // Don't send animtime unless the client needs it.
}
REGISTER_SEND_PROXY_NON_MODIFIED_POINTER( SendProxy_ClientSideAnimation );
BEGIN_SEND_TABLE_NOBASE( CBaseEntity, DT_AnimTimeMustBeFirst )
// NOTE: Animtime must be sent before origin and angles ( from pev ) because it has a
// proxy on the client that stores off the old values before writing in the new values and
@ -213,7 +200,7 @@ void SendProxy_Angles( const SendProp *pProp, const void *pStruct, const void *p
// This table encodes the CBaseEntity data.
IMPLEMENT_SERVERCLASS_ST_NOBASE( CBaseEntity, DT_BaseEntity )
SendPropDataTable( "AnimTimeMustBeFirst", 0, &REFERENCE_SEND_TABLE(DT_AnimTimeMustBeFirst), SendProxy_ClientSideAnimation ),
SendPropDataTable( "AnimTimeMustBeFirst", 0, &REFERENCE_SEND_TABLE(DT_AnimTimeMustBeFirst) ),
SendPropFloat (SENDINFO(m_flSimulationTime)),
#if PREDICTION_ERROR_CHECK_LEVEL > 1