Do not exclude useful send prop variables

This commit is contained in:
Kamay Xutax 2024-04-03 00:18:21 +02:00
parent 855547301d
commit db45d29da3
7 changed files with 3 additions and 68 deletions

View file

@ -147,11 +147,6 @@ const unsigned int FCLIENTANIM_SEQUENCE_CYCLE = 0x00000001;
static CUtlVector< clientanimating_t > g_ClientSideAnimationList; static CUtlVector< clientanimating_t > g_ClientSideAnimationList;
BEGIN_RECV_TABLE_NOBASE( C_BaseAnimating, DT_ServerAnimationData )
RecvPropFloat(RECVINFO(m_flCycle)),
END_RECV_TABLE()
void RecvProxy_Sequence( const CRecvProxyData *pData, void *pStruct, void *pOut ) void RecvProxy_Sequence( const CRecvProxyData *pData, void *pStruct, void *pOut )
{ {
// Have the regular proxy store the data. // Have the regular proxy store the data.
@ -196,7 +191,7 @@ IMPLEMENT_CLIENTCLASS_DT(C_BaseAnimating, DT_BaseAnimating, CBaseAnimating)
RecvPropEHandle(RECVINFO(m_hLightingOrigin)), RecvPropEHandle(RECVINFO(m_hLightingOrigin)),
RecvPropEHandle(RECVINFO(m_hLightingOriginRelative)), RecvPropEHandle(RECVINFO(m_hLightingOriginRelative)),
RecvPropDataTable( "serveranimdata", 0, 0, &REFERENCE_RECV_TABLE( DT_ServerAnimationData ) ), RecvPropFloat(RECVINFO(m_flCycle)),
RecvPropFloat( RECVINFO( m_fadeMinDist ) ), RecvPropFloat( RECVINFO( m_fadeMinDist ) ),
RecvPropFloat( RECVINFO( m_fadeMaxDist ) ), RecvPropFloat( RECVINFO( m_fadeMaxDist ) ),

View file

@ -711,8 +711,6 @@ BEGIN_RECV_TABLE_NOBASE( C_CSPlayer, DT_CSLocalPlayerExclusive )
RecvPropInt( RECVINFO( m_iShotsFired ) ), RecvPropInt( RECVINFO( m_iShotsFired ) ),
RecvPropFloat( RECVINFO( m_flVelocityModifier ) ), RecvPropFloat( RECVINFO( m_flVelocityModifier ) ),
RecvPropVector( RECVINFO_NAME( m_vecNetworkOrigin, m_vecOrigin ) ),
//============================================================================= //=============================================================================
// HPE_BEGIN: // HPE_BEGIN:
// [tj]Set up the receive table for per-client domination data // [tj]Set up the receive table for per-client domination data
@ -727,15 +725,8 @@ BEGIN_RECV_TABLE_NOBASE( C_CSPlayer, DT_CSLocalPlayerExclusive )
END_RECV_TABLE() END_RECV_TABLE()
BEGIN_RECV_TABLE_NOBASE( C_CSPlayer, DT_CSNonLocalPlayerExclusive )
RecvPropVector( RECVINFO_NAME( m_vecNetworkOrigin, m_vecOrigin ) ),
END_RECV_TABLE()
IMPLEMENT_CLIENTCLASS_DT( C_CSPlayer, DT_CSPlayer, CCSPlayer ) IMPLEMENT_CLIENTCLASS_DT( C_CSPlayer, DT_CSPlayer, CCSPlayer )
RecvPropDataTable( "cslocaldata", 0, 0, &REFERENCE_RECV_TABLE(DT_CSLocalPlayerExclusive) ), RecvPropDataTable( "cslocaldata", 0, 0, &REFERENCE_RECV_TABLE(DT_CSLocalPlayerExclusive) ),
RecvPropDataTable( "csnonlocaldata", 0, 0, &REFERENCE_RECV_TABLE(DT_CSNonLocalPlayerExclusive) ),
RecvPropInt( RECVINFO( m_iAddonBits ) ), RecvPropInt( RECVINFO( m_iAddonBits ) ),
RecvPropInt( RECVINFO( m_iPrimaryAddon ) ), RecvPropInt( RECVINFO( m_iPrimaryAddon ) ),
RecvPropInt( RECVINFO( m_iSecondaryAddon ) ), RecvPropInt( RECVINFO( m_iSecondaryAddon ) ),

View file

@ -217,12 +217,6 @@ BEGIN_DATADESC( CBaseAnimating )
END_DATADESC() END_DATADESC()
// Sendtable for fields we don't want to send to clientside animating entities
BEGIN_SEND_TABLE_NOBASE( CBaseAnimating, DT_ServerAnimationData )
// ANIMATION_CYCLE_BITS is defined in shareddefs.h
SendPropFloat (SENDINFO(m_flCycle), ANIMATION_CYCLE_BITS, SPROP_CHANGES_OFTEN|SPROP_ROUNDDOWN, 0.0f, 1.0f)
END_SEND_TABLE()
void *SendProxy_ClientSideAnimation( const SendProp *pProp, const void *pStruct, const void *pVarData, CSendProxyRecipients *pRecipients, int objectID ); void *SendProxy_ClientSideAnimation( const SendProp *pProp, const void *pStruct, const void *pVarData, CSendProxyRecipients *pRecipients, int objectID );
// SendTable stuff. // SendTable stuff.
@ -254,7 +248,7 @@ IMPLEMENT_SERVERCLASS_ST(CBaseAnimating, DT_BaseAnimating)
SendPropEHandle( SENDINFO( m_hLightingOrigin ) ), SendPropEHandle( SENDINFO( m_hLightingOrigin ) ),
SendPropEHandle( SENDINFO( m_hLightingOriginRelative ) ), SendPropEHandle( SENDINFO( m_hLightingOriginRelative ) ),
SendPropDataTable( "serveranimdata", 0, &REFERENCE_SEND_TABLE( DT_ServerAnimationData ), SendProxy_ClientSideAnimation ), SendPropFloat( SENDINFO(m_flCycle) ),
// Fading // Fading
SendPropFloat( SENDINFO( m_fadeMinDist ), 0, SPROP_NOSCALE ), SendPropFloat( SENDINFO( m_fadeMinDist ), 0, SPROP_NOSCALE ),

View file

@ -561,10 +561,6 @@ void SendProxy_FuncRotatingAngle( const SendProp *pProp, const void *pStruct, co
} }
IMPLEMENT_SERVERCLASS_ST(CFuncRotating, DT_FuncRotating) IMPLEMENT_SERVERCLASS_ST(CFuncRotating, DT_FuncRotating)
SendPropExclude( "DT_BaseEntity", "m_angRotation" ),
SendPropExclude( "DT_BaseEntity", "m_vecOrigin" ),
SendPropExclude( "DT_BaseEntity", "m_flSimulationTime" ),
SendPropVector(SENDINFO(m_vecOrigin), -1, SPROP_COORD|SPROP_CHANGES_OFTEN, 0.0f, HIGH_DEFAULT, SendProxy_FuncRotatingOrigin ), SendPropVector(SENDINFO(m_vecOrigin), -1, SPROP_COORD|SPROP_CHANGES_OFTEN, 0.0f, HIGH_DEFAULT, SendProxy_FuncRotatingOrigin ),
SendPropAngle( SENDINFO_VECTORELEM(m_angRotation, 0), 13, SPROP_CHANGES_OFTEN, SendProxy_FuncRotatingAngle ), SendPropAngle( SENDINFO_VECTORELEM(m_angRotation, 0), 13, SPROP_CHANGES_OFTEN, SendProxy_FuncRotatingAngle ),
SendPropAngle( SENDINFO_VECTORELEM(m_angRotation, 1), 13, SPROP_CHANGES_OFTEN, SendProxy_FuncRotatingAngle ), SendPropAngle( SENDINFO_VECTORELEM(m_angRotation, 1), 13, SPROP_CHANGES_OFTEN, SendProxy_FuncRotatingAngle ),

View file

@ -309,9 +309,6 @@ BEGIN_SEND_TABLE_NOBASE( CCSPlayer, DT_CSLocalPlayerExclusive )
SendPropInt( SENDINFO( m_iShotsFired ), 8, SPROP_UNSIGNED ), SendPropInt( SENDINFO( m_iShotsFired ), 8, SPROP_UNSIGNED ),
SendPropFloat( SENDINFO( m_flVelocityModifier ), 8, 0, 0, 1 ), SendPropFloat( SENDINFO( m_flVelocityModifier ), 8, 0, 0, 1 ),
// send a hi-res origin to the local player for use in prediction
SendPropVector (SENDINFO(m_vecOrigin), -1, SPROP_NOSCALE|SPROP_CHANGES_OFTEN, 0.0f, HIGH_DEFAULT, SendProxy_Origin ),
//============================================================================= //=============================================================================
// HPE_BEGIN: // HPE_BEGIN:
// [tj]Set up the send table for per-client domination data // [tj]Set up the send table for per-client domination data
@ -326,33 +323,9 @@ BEGIN_SEND_TABLE_NOBASE( CCSPlayer, DT_CSLocalPlayerExclusive )
END_SEND_TABLE() END_SEND_TABLE()
BEGIN_SEND_TABLE_NOBASE( CCSPlayer, DT_CSNonLocalPlayerExclusive )
// send a lo-res origin to other players
SendPropVector (SENDINFO(m_vecOrigin), -1, SPROP_COORD|SPROP_CHANGES_OFTEN, 0.0f, HIGH_DEFAULT, SendProxy_Origin ),
END_SEND_TABLE()
IMPLEMENT_SERVERCLASS_ST( CCSPlayer, DT_CSPlayer ) IMPLEMENT_SERVERCLASS_ST( CCSPlayer, DT_CSPlayer )
SendPropExclude( "DT_BaseAnimating", "m_flPoseParameter" ),
SendPropExclude( "DT_BaseAnimating", "m_flPlaybackRate" ),
SendPropExclude( "DT_BaseAnimating", "m_nSequence" ),
SendPropExclude( "DT_BaseAnimating", "m_nNewSequenceParity" ),
SendPropExclude( "DT_BaseAnimating", "m_nResetEventsParity" ),
SendPropExclude( "DT_BaseAnimating", "m_nMuzzleFlashParity" ),
SendPropExclude( "DT_BaseEntity", "m_angRotation" ),
SendPropExclude( "DT_BaseAnimatingOverlay", "overlay_vars" ),
// cs_playeranimstate and clientside animation takes care of these on the client
SendPropExclude( "DT_ServerAnimationData" , "m_flCycle" ),
SendPropExclude( "DT_AnimTimeMustBeFirst" , "m_flAnimTime" ),
// We need to send a hi-res origin to the local player to avoid prediction errors sliding along walls
SendPropExclude( "DT_BaseEntity", "m_vecOrigin" ),
// Data that only gets sent to the local player. // Data that only gets sent to the local player.
SendPropDataTable( "cslocaldata", 0, &REFERENCE_SEND_TABLE(DT_CSLocalPlayerExclusive), SendProxy_SendLocalDataTable ), SendPropDataTable( "cslocaldata", 0, &REFERENCE_SEND_TABLE(DT_CSLocalPlayerExclusive), SendProxy_SendLocalDataTable ),
SendPropDataTable( "csnonlocaldata", 0, &REFERENCE_SEND_TABLE(DT_CSNonLocalPlayerExclusive), SendProxy_SendNonLocalDataTable ),
SendPropInt( SENDINFO( m_iThrowGrenadeCounter ), THROWGRENADE_COUNTER_BITS, SPROP_UNSIGNED ), SendPropInt( SENDINFO( m_iThrowGrenadeCounter ), THROWGRENADE_COUNTER_BITS, SPROP_UNSIGNED ),
SendPropInt( SENDINFO( m_iAddonBits ), NUM_ADDON_BITS, SPROP_UNSIGNED ), SendPropInt( SENDINFO( m_iAddonBits ), NUM_ADDON_BITS, SPROP_UNSIGNED ),

View file

@ -83,17 +83,6 @@ END_DATADESC()
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
IMPLEMENT_SERVERCLASS_ST( CHostage, DT_CHostage ) IMPLEMENT_SERVERCLASS_ST( CHostage, DT_CHostage )
SendPropExclude( "DT_BaseAnimating", "m_flPoseParameter" ),
SendPropExclude( "DT_BaseAnimating", "m_flPlaybackRate" ),
SendPropExclude( "DT_BaseAnimating", "m_nSequence" ),
SendPropExclude( "DT_BaseAnimating", "m_nNewSequenceParity" ),
SendPropExclude( "DT_BaseAnimating", "m_nResetEventsParity" ),
SendPropExclude( "DT_BaseAnimatingOverlay", "overlay_vars" ),
// cs_playeranimstate and clientside animation takes care of these on the client
SendPropExclude( "DT_ServerAnimationData" , "m_flCycle" ),
SendPropExclude( "DT_AnimTimeMustBeFirst" , "m_flAnimTime" ),
SendPropBool( SENDINFO(m_isRescued) ), SendPropBool( SENDINFO(m_isRescued) ),
SendPropInt( SENDINFO(m_iHealth), 10 ), SendPropInt( SENDINFO(m_iHealth), 10 ),
SendPropInt( SENDINFO(m_iMaxHealth), 10 ), SendPropInt( SENDINFO(m_iMaxHealth), 10 ),

View file

@ -274,10 +274,7 @@ IMPLEMENT_NETWORKCLASS_ALIASED( WeaponCSBase, DT_WeaponCSBase )
BEGIN_NETWORK_TABLE( CWeaponCSBase, DT_WeaponCSBase ) BEGIN_NETWORK_TABLE( CWeaponCSBase, DT_WeaponCSBase )
#if !defined( CLIENT_DLL ) #if !defined( CLIENT_DLL )
SendPropInt( SENDINFO( m_weaponMode ), 1, SPROP_UNSIGNED ), SendPropInt( SENDINFO( m_weaponMode ), 1, SPROP_UNSIGNED ),
SendPropFloat(SENDINFO(m_fAccuracyPenalty) ), SendPropFloat(SENDINFO(m_fAccuracyPenalty) )
// world weapon models have no aminations
SendPropExclude( "DT_AnimTimeMustBeFirst", "m_flAnimTime" ),
SendPropExclude( "DT_BaseAnimating", "m_nSequence" ),
// SendPropExclude( "DT_LocalActiveWeaponData", "m_flTimeWeaponIdle" ), // SendPropExclude( "DT_LocalActiveWeaponData", "m_flTimeWeaponIdle" ),
#else #else
RecvPropInt( RECVINFO( m_weaponMode ) ), RecvPropInt( RECVINFO( m_weaponMode ) ),