From 7bfb4f8acee3ee19ec23a967d8017ac1e90b116a Mon Sep 17 00:00:00 2001 From: Kamay Xutax Date: Wed, 3 Apr 2024 00:18:21 +0200 Subject: [PATCH] Do not exclude useful send prop variables --- game/client/c_baseanimating.cpp | 7 +---- game/client/cstrike/c_cs_player.cpp | 9 ------- game/server/baseanimating.cpp | 8 +----- game/server/bmodels.cpp | 4 --- game/server/cstrike/cs_player.cpp | 27 ------------------- .../cstrike/hostage/cs_simple_hostage.cpp | 11 -------- game/shared/cstrike/weapon_csbase.cpp | 5 +--- 7 files changed, 3 insertions(+), 68 deletions(-) diff --git a/game/client/c_baseanimating.cpp b/game/client/c_baseanimating.cpp index dd00fc8d5a..80cfb5e392 100644 --- a/game/client/c_baseanimating.cpp +++ b/game/client/c_baseanimating.cpp @@ -147,11 +147,6 @@ const unsigned int FCLIENTANIM_SEQUENCE_CYCLE = 0x00000001; 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 ) { // 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_hLightingOriginRelative)), - RecvPropDataTable( "serveranimdata", 0, 0, &REFERENCE_RECV_TABLE( DT_ServerAnimationData ) ), + RecvPropFloat(RECVINFO(m_flCycle)), RecvPropFloat( RECVINFO( m_fadeMinDist ) ), RecvPropFloat( RECVINFO( m_fadeMaxDist ) ), diff --git a/game/client/cstrike/c_cs_player.cpp b/game/client/cstrike/c_cs_player.cpp index 63af2e5a7e..314fa1a6b0 100644 --- a/game/client/cstrike/c_cs_player.cpp +++ b/game/client/cstrike/c_cs_player.cpp @@ -711,8 +711,6 @@ BEGIN_RECV_TABLE_NOBASE( C_CSPlayer, DT_CSLocalPlayerExclusive ) RecvPropInt( RECVINFO( m_iShotsFired ) ), RecvPropFloat( RECVINFO( m_flVelocityModifier ) ), - RecvPropVector( RECVINFO_NAME( m_vecNetworkOrigin, m_vecOrigin ) ), - //============================================================================= // HPE_BEGIN: // [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() - -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 ) 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_iPrimaryAddon ) ), RecvPropInt( RECVINFO( m_iSecondaryAddon ) ), diff --git a/game/server/baseanimating.cpp b/game/server/baseanimating.cpp index a2e8dcfd6d..1dcb235c68 100644 --- a/game/server/baseanimating.cpp +++ b/game/server/baseanimating.cpp @@ -217,12 +217,6 @@ BEGIN_DATADESC( CBaseAnimating ) 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 ); // SendTable stuff. @@ -254,7 +248,7 @@ IMPLEMENT_SERVERCLASS_ST(CBaseAnimating, DT_BaseAnimating) SendPropEHandle( SENDINFO( m_hLightingOrigin ) ), SendPropEHandle( SENDINFO( m_hLightingOriginRelative ) ), - SendPropDataTable( "serveranimdata", 0, &REFERENCE_SEND_TABLE( DT_ServerAnimationData ), SendProxy_ClientSideAnimation ), + SendPropFloat( SENDINFO(m_flCycle) ), // Fading SendPropFloat( SENDINFO( m_fadeMinDist ), 0, SPROP_NOSCALE ), diff --git a/game/server/bmodels.cpp b/game/server/bmodels.cpp index da69ca03a9..94ed86e9d3 100644 --- a/game/server/bmodels.cpp +++ b/game/server/bmodels.cpp @@ -561,10 +561,6 @@ void SendProxy_FuncRotatingAngle( const SendProp *pProp, const void *pStruct, co } 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 ), SendPropAngle( SENDINFO_VECTORELEM(m_angRotation, 0), 13, SPROP_CHANGES_OFTEN, SendProxy_FuncRotatingAngle ), SendPropAngle( SENDINFO_VECTORELEM(m_angRotation, 1), 13, SPROP_CHANGES_OFTEN, SendProxy_FuncRotatingAngle ), diff --git a/game/server/cstrike/cs_player.cpp b/game/server/cstrike/cs_player.cpp index fecff79018..5619504ad6 100644 --- a/game/server/cstrike/cs_player.cpp +++ b/game/server/cstrike/cs_player.cpp @@ -309,9 +309,6 @@ BEGIN_SEND_TABLE_NOBASE( CCSPlayer, DT_CSLocalPlayerExclusive ) SendPropInt( SENDINFO( m_iShotsFired ), 8, SPROP_UNSIGNED ), 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: // [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() - -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 ) - 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. 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_iAddonBits ), NUM_ADDON_BITS, SPROP_UNSIGNED ), diff --git a/game/server/cstrike/hostage/cs_simple_hostage.cpp b/game/server/cstrike/hostage/cs_simple_hostage.cpp index aacab39163..3e254b73aa 100644 --- a/game/server/cstrike/hostage/cs_simple_hostage.cpp +++ b/game/server/cstrike/hostage/cs_simple_hostage.cpp @@ -83,17 +83,6 @@ END_DATADESC() //----------------------------------------------------------------------------------------------------- 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) ), SendPropInt( SENDINFO(m_iHealth), 10 ), SendPropInt( SENDINFO(m_iMaxHealth), 10 ), diff --git a/game/shared/cstrike/weapon_csbase.cpp b/game/shared/cstrike/weapon_csbase.cpp index 8063b919e9..b5c01d4e7c 100644 --- a/game/shared/cstrike/weapon_csbase.cpp +++ b/game/shared/cstrike/weapon_csbase.cpp @@ -274,10 +274,7 @@ IMPLEMENT_NETWORKCLASS_ALIASED( WeaponCSBase, DT_WeaponCSBase ) BEGIN_NETWORK_TABLE( CWeaponCSBase, DT_WeaponCSBase ) #if !defined( CLIENT_DLL ) SendPropInt( SENDINFO( m_weaponMode ), 1, SPROP_UNSIGNED ), -SendPropFloat(SENDINFO(m_fAccuracyPenalty) ), -// world weapon models have no aminations -SendPropExclude( "DT_AnimTimeMustBeFirst", "m_flAnimTime" ), -SendPropExclude( "DT_BaseAnimating", "m_nSequence" ), +SendPropFloat(SENDINFO(m_fAccuracyPenalty) ) // SendPropExclude( "DT_LocalActiveWeaponData", "m_flTimeWeaponIdle" ), #else RecvPropInt( RECVINFO( m_weaponMode ) ),