BEGIN_RECV_TABLE_NOBASE(DTTestClientSub, DT_DTTestSub) // - Auto type conversions (receiving an array of floats into an array of ints). RecvPropArray( RecvPropFloat(RECVINFO(m_FloatArray[0])), m_FloatArray), RecvPropUtlVector( RECVINFO_UTLVECTOR( m_UtlVectorFloat ), MAX_FLOATARRAY_ELEMENTS, RecvPropFloat(NULL,0,0) ), RecvPropUtlVectorDataTable( m_UtlVectorStruct, MAX_STRUCTARRAY_ELEMENTS, DT_TestStruct ), RecvPropUtlVector( RECVINFO_UTLVECTOR( m_UtlVectorChar ), MAX_CHARARRAY_ELEMENTS, RecvPropInt( NULL, 0, sizeof( char ) ) ), RecvPropArray( RecvPropString(RECVINFO(m_Strings[0]), 0, RecvProxy_DTTestClientSubString), m_Strings), END_RECV_TABLE() BEGIN_RECV_TABLE_NOBASE(DTTestSub2Sub, DT_DTTestSub2Sub) RecvPropInt( RECVINFO( m_Int2 ), 32 ), END_RECV_TABLE() BEGIN_RECV_TABLE_NOBASE(DTTestSub2, DT_DTTestSub2) RecvPropDataTable(RECVINFO_DT(m_Sub), 0, &REFERENCE_RECV_TABLE(DT_DTTestSub2Sub)), RecvPropInt( RECVINFO( m_Int ) ), END_RECV_TABLE()
float m_flNorthOffset; bool m_bEnableShadows; bool m_bOldEnableShadows; static ClientShadowHandle_t m_LocalFlashlightHandle; }; ClientShadowHandle_t C_GlobalLight::m_LocalFlashlightHandle = CLIENTSHADOW_INVALID_HANDLE; IMPLEMENT_CLIENTCLASS_DT(C_GlobalLight, DT_GlobalLight, CGlobalLight) RecvPropVector(RECVINFO(m_shadowDirection)), RecvPropBool(RECVINFO(m_bEnabled)), RecvPropString(RECVINFO(m_TextureName)), RecvPropInt(RECVINFO(m_LightColor), 0, RecvProxy_Int32ToColor32), RecvPropFloat(RECVINFO(m_flColorTransitionTime)), RecvPropFloat(RECVINFO(m_flSunDistance)), RecvPropFloat(RECVINFO(m_flFOV)), RecvPropFloat(RECVINFO(m_flNearZ)), RecvPropFloat(RECVINFO(m_flNorthOffset)), RecvPropBool(RECVINFO(m_bEnableShadows)), END_RECV_TABLE() C_GlobalLight::~C_GlobalLight() { if ( m_LocalFlashlightHandle != CLIENTSHADOW_INVALID_HANDLE ) { g_pClientShadowMgr->DestroyFlashlight( m_LocalFlashlightHandle ); m_LocalFlashlightHandle = CLIENTSHADOW_INVALID_HANDLE;
// // $NoKeywords: $ //=============================================================================// #include "cbase.h" #include "c_vote_controller.h" #include "shareddefs.h" #include "hud.h" #include "cdll_client_int.h" #include "igameevents.h" #include "hud_vote.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" IMPLEMENT_CLIENTCLASS_DT( C_VoteController, DT_VoteController, CVoteController ) RecvPropInt( RECVINFO( m_iActiveIssueIndex ), 0, C_VoteController::RecvProxy_VoteType ), RecvPropInt( RECVINFO( m_iOnlyTeamToVote ) ), RecvPropArray3( RECVINFO_ARRAY( m_nVoteOptionCount ), RecvPropInt( RECVINFO( m_nVoteOptionCount[0] ), 0, C_VoteController::RecvProxy_VoteOption ) ), RecvPropInt( RECVINFO( m_nPotentialVotes ) ), RecvPropBool( RECVINFO( m_bIsYesNoVote ) ) END_RECV_TABLE() //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void C_VoteController::RecvProxy_VoteType( const CRecvProxyData *pData, void *pStruct, void *pOut ) { C_VoteController *pMe = (C_VoteController *)pStruct; if( pMe->m_iActiveIssueIndex == pData->m_Value.m_Int ) return;
#include "c_sun.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" static void RecvProxy_HDRColorScale( const CRecvProxyData *pData, void *pStruct, void *pOut ) { C_Sun *pSun = ( C_Sun * )pStruct; pSun->m_Overlay.m_flHDRColorScale = pData->m_Value.m_Float; pSun->m_GlowOverlay.m_flHDRColorScale = pData->m_Value.m_Float; } IMPLEMENT_CLIENTCLASS_DT_NOBASE( C_Sun, DT_Sun, CSun ) RecvPropInt( RECVINFO(m_clrRender), 0, RecvProxy_Int32ToColor32 ), RecvPropInt( RECVINFO(m_clrOverlay), 0, RecvProxy_Int32ToColor32 ), RecvPropVector( RECVINFO( m_vDirection ) ), RecvPropInt( RECVINFO( m_bOn ) ), RecvPropInt( RECVINFO( m_nSize ) ), RecvPropInt( RECVINFO( m_nOverlaySize ) ), RecvPropInt( RECVINFO( m_nMaterial ) ), RecvPropInt( RECVINFO( m_nOverlayMaterial ) ), RecvPropFloat("HDRColorScale", 0, SIZEOF_IGNORE, 0, RecvProxy_HDRColorScale), END_RECV_TABLE() C_Sun::C_Sun() { m_Overlay.m_bDirectional = true; m_Overlay.m_bInSky = true;
{ // Have the regular proxy store the data. RecvProxy_Int32ToInt32( pData, pStruct, pOut ); if ( g_PR ) { g_PR->TeamChanged(); } } IMPLEMENT_CLIENTCLASS_DT_NOBASE(C_PlayerResource, DT_PlayerResource, CPlayerResource) RecvPropArray3( RECVINFO_ARRAY(m_iPing), RecvPropInt( RECVINFO(m_iPing[0]))), RecvPropArray3( RECVINFO_ARRAY(m_iScore), RecvPropInt( RECVINFO(m_iScore[0]))), RecvPropArray3( RECVINFO_ARRAY(m_iDeaths), RecvPropInt( RECVINFO(m_iDeaths[0]))), RecvPropArray3( RECVINFO_ARRAY(m_bConnected), RecvPropInt( RECVINFO(m_bConnected[0]))), RecvPropArray3( RECVINFO_ARRAY(m_iTeam), RecvPropInt( RECVINFO(m_iTeam[0]), 0, RecvProxy_ChangedTeam )), RecvPropArray3( RECVINFO_ARRAY(m_bAlive), RecvPropInt( RECVINFO(m_bAlive[0]))), RecvPropArray3( RECVINFO_ARRAY(m_iHealth), RecvPropInt( RECVINFO(m_iHealth[0]))), RecvPropArray3( RECVINFO_ARRAY(m_iOwnerNumbers), RecvPropInt( RECVINFO(m_iOwnerNumbers[0]))), END_RECV_TABLE() BEGIN_PREDICTION_DATA( C_PlayerResource ) DEFINE_PRED_ARRAY( m_szName, FIELD_STRING, MAX_PLAYERS+1, FTYPEDESC_PRIVATE ), DEFINE_PRED_ARRAY( m_iPing, FIELD_INTEGER, MAX_PLAYERS+1, FTYPEDESC_PRIVATE ), DEFINE_PRED_ARRAY( m_iScore, FIELD_INTEGER, MAX_PLAYERS+1, FTYPEDESC_PRIVATE ), DEFINE_PRED_ARRAY( m_iDeaths, FIELD_INTEGER, MAX_PLAYERS+1, FTYPEDESC_PRIVATE ), DEFINE_PRED_ARRAY( m_bConnected, FIELD_BOOLEAN, MAX_PLAYERS+1, FTYPEDESC_PRIVATE ), DEFINE_PRED_ARRAY( m_iTeam, FIELD_INTEGER, MAX_PLAYERS+1, FTYPEDESC_PRIVATE ), DEFINE_PRED_ARRAY( m_bAlive, FIELD_BOOLEAN, MAX_PLAYERS+1, FTYPEDESC_PRIVATE ), DEFINE_PRED_ARRAY( m_iHealth, FIELD_INTEGER, MAX_PLAYERS+1, FTYPEDESC_PRIVATE ),
int m_nLength; int m_nSize; PMaterialHandle m_MaterialHandle; PMaterialHandle m_EmberMaterialHandle; TimedEvent m_ParticleSpawn; CSmartPtr<CSimpleEmitter> m_pEmitter; CSmartPtr<CEmberEffect> m_pEmberEmitter; private: C_ExtinguisherJet( const C_ExtinguisherJet & ); }; //Datatable IMPLEMENT_CLIENTCLASS_DT( C_ExtinguisherJet, DT_ExtinguisherJet, CExtinguisherJet ) RecvPropInt(RECVINFO(m_bEmit), 0), RecvPropInt(RECVINFO(m_bUseMuzzlePoint), 0), RecvPropInt(RECVINFO(m_nLength), 0), RecvPropInt(RECVINFO(m_nSize), 0), END_RECV_TABLE() //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- C_ExtinguisherJet::C_ExtinguisherJet( void ) { m_bEmit = false; m_pEmitter = NULL; m_pEmberEmitter = NULL; }
//========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============ // // Purpose: // // $NoKeywords: $ //============================================================================= #include "cbase.h" #include "c_tf_class_recon.h" //============================================================================= // // Recon Data Table // BEGIN_RECV_TABLE_NOBASE( C_PlayerClassRecon, DT_PlayerClassReconData ) RecvPropInt ( RECVINFO( m_ClassData.m_nJumpCount ) ), RecvPropFloat ( RECVINFO( m_ClassData.m_flSuppressionJumpTime ) ), RecvPropFloat ( RECVINFO( m_ClassData.m_flSuppressionImpactTime ) ), RecvPropFloat ( RECVINFO( m_ClassData.m_flStickTime ) ), RecvPropFloat ( RECVINFO( m_ClassData.m_flActiveJumpTime ) ), RecvPropFloat ( RECVINFO( m_ClassData.m_flImpactDist ) ), RecvPropVector ( RECVINFO( m_ClassData.m_vecImpactNormal ) ), RecvPropVector ( RECVINFO( m_ClassData.m_vecUnstickVelocity ) ), RecvPropInt ( RECVINFO( m_ClassData.m_bTrailParticles ) ), END_RECV_TABLE() BEGIN_PREDICTION_DATA_NO_BASE( C_PlayerClassRecon ) DEFINE_PRED_TYPEDESCRIPTION( C_PlayerClassRecon, m_ClassData, PlayerClassReconData_t ), END_PREDICTION_DATA()
bool m_bEnterAnimOn; bool m_bExitAnimOn; Vector m_vecEyeExitEndpoint; float m_flFOV; // The current FOV (changes during entry/exit anims). ViewSmoothingData_t m_ViewSmoothingData; vehicleview_t m_vehicleView; }; IMPLEMENT_CLIENTCLASS_DT(C_PropVehicleChoreoGeneric, DT_PropVehicleChoreoGeneric, CPropVehicleChoreoGeneric) RecvPropEHandle( RECVINFO(m_hPlayer) ), RecvPropBool( RECVINFO( m_bEnterAnimOn ) ), RecvPropBool( RECVINFO( m_bExitAnimOn ) ), RecvPropVector( RECVINFO( m_vecEyeExitEndpoint ) ), RecvPropBool( RECVINFO( m_vehicleView.bClampEyeAngles ) ), RecvPropFloat( RECVINFO( m_vehicleView.flPitchCurveZero ) ), RecvPropFloat( RECVINFO( m_vehicleView.flPitchCurveLinear ) ), RecvPropFloat( RECVINFO( m_vehicleView.flRollCurveZero ) ), RecvPropFloat( RECVINFO( m_vehicleView.flRollCurveLinear ) ), RecvPropFloat( RECVINFO( m_vehicleView.flFOV ) ), RecvPropFloat( RECVINFO( m_vehicleView.flYawMin ) ), RecvPropFloat( RECVINFO( m_vehicleView.flYawMax ) ), RecvPropFloat( RECVINFO( m_vehicleView.flPitchMin ) ), RecvPropFloat( RECVINFO( m_vehicleView.flPitchMax ) ), END_RECV_TABLE() BEGIN_DATADESC( C_PropVehicleChoreoGeneric ) DEFINE_EMBEDDED( m_ViewSmoothingData ), END_DATADESC()
RECVINFO_ARRAY( m_hAttachEntity ), RecvPropEHandle (RECVINFO(m_hAttachEntity[0])) ), RecvPropArray3 ( RECVINFO_ARRAY( m_nAttachIndex ), RecvPropInt (RECVINFO(m_nAttachIndex[0])) ), RecvPropInt (RECVINFO(m_nHaloIndex)), RecvPropFloat (RECVINFO(m_fHaloScale)), RecvPropFloat (RECVINFO(m_fWidth)), RecvPropFloat (RECVINFO(m_fEndWidth)), RecvPropFloat (RECVINFO(m_fFadeLength)), RecvPropFloat (RECVINFO(m_fAmplitude)), RecvPropFloat (RECVINFO(m_fStartFrame)), RecvPropFloat (RECVINFO(m_fSpeed), 0, RecvProxy_Beam_ScrollSpeed ), RecvPropFloat(RECVINFO(m_flFrameRate)), RecvPropFloat(RECVINFO(m_flHDRColorScale)), RecvPropInt(RECVINFO(m_clrRender), 0, RecvProxy_Int32ToColor32 ), RecvPropInt(RECVINFO(m_nRenderFX)), RecvPropInt(RECVINFO(m_nRenderMode)), RecvPropFloat(RECVINFO(m_flFrame)), RecvPropInt(RECVINFO(m_nClipStyle)), RecvPropVector(RECVINFO(m_vecEndPos)), RecvPropInt(RECVINFO(m_nModelIndex)), RecvPropVector(RECVINFO_NAME(m_vecNetworkOrigin, m_vecOrigin)), RecvPropInt( RECVINFO_NAME(m_hNetworkMoveParent, moveparent), 0, RecvProxy_IntToMoveParent ), #if !defined( NO_ENTITY_PREDICTION ) && defined( USE_PREDICTABLEID ) RecvPropDataTable( "beampredictable_id", 0, 0, &REFERENCE_RECV_TABLE( DT_BeamPredictableId ) ),
#include "cbase.h" #include "C_Point_Camera.h" #include "toolframework/itoolframework.h" #include "toolframework_client.h" #include "tier1/keyvalues.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" IMPLEMENT_CLIENTCLASS_DT( C_PointCamera, DT_PointCamera, CPointCamera ) RecvPropFloat( RECVINFO( m_FOV ) ), RecvPropFloat( RECVINFO( m_Resolution ) ), RecvPropInt( RECVINFO( m_bFogEnable ) ), RecvPropInt( RECVINFO( m_FogColor ), 0, RecvProxy_Int32ToColor32 ), RecvPropFloat( RECVINFO( m_flFogStart ) ), RecvPropFloat( RECVINFO( m_flFogEnd ) ), RecvPropFloat( RECVINFO( m_flFogMaxDensity ) ), RecvPropBool( RECVINFO( m_bActive ) ), RecvPropBool( RECVINFO( m_bUseScreenAspectRatio ) ), RecvPropBool( RECVINFO( m_bNoSky ) ), RecvPropFloat( RECVINFO( m_fBrightness ) ), END_RECV_TABLE() C_EntityClassList<C_PointCamera> g_PointCameraList; template<> C_PointCamera *C_EntityClassList<C_PointCamera>::m_pClassList = NULL; C_PointCamera* GetPointCameraList() { return g_PointCameraList.m_pClassList;
// Purpose: //----------------------------------------------------------------------------- class C_FuncRotating : public C_BaseEntity { public: DECLARE_CLASS( C_FuncRotating, C_BaseEntity ); DECLARE_CLIENTCLASS(); C_FuncRotating(); private: }; extern void RecvProxy_SimulationTime( const CRecvProxyData *pData, void *pStruct, void *pOut ); IMPLEMENT_CLIENTCLASS_DT( C_FuncRotating, DT_FuncRotating, CFuncRotating ) RecvPropVector( RECVINFO_NAME( m_vecNetworkOrigin, m_vecOrigin ) ), RecvPropFloat( RECVINFO_NAME( m_angNetworkAngles[0], m_angRotation[0] ) ), RecvPropFloat( RECVINFO_NAME( m_angNetworkAngles[1], m_angRotation[1] ) ), RecvPropFloat( RECVINFO_NAME( m_angNetworkAngles[2], m_angRotation[2] ) ), RecvPropInt( RECVINFO(m_flSimulationTime), 0, RecvProxy_SimulationTime ), END_RECV_TABLE() //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- C_FuncRotating::C_FuncRotating() { }
} void RecvProxy_ScaleZz( const CRecvProxyData *pData, void *pStruct, void *pOut ) //Modification: Edited function names due to conflict with c_prop_coreball.cpp Formerly RecvProxy_ScaleZ { C_PropScalable *pCoreData = (C_PropScalable *) pStruct; pCoreData->m_flScaleZ = pData->m_Value.m_Float; if ( pCoreData->m_bRunningScale[2] == true ) { pCoreData->m_flTargetScale[2] = pCoreData->m_flCurrentScale[2]; } } IMPLEMENT_CLIENTCLASS_DT( C_PropScalable, DT_PropScalable, CPropScalable ) RecvPropFloat( RECVINFO( m_flScaleX ), 0, RecvProxy_ScaleXx ), //Modification: Edited function names due to conflict with c_prop_coreball.cpp Formerly RecvProxy_ScaleX RecvPropFloat( RECVINFO( m_flScaleY ), 0, RecvProxy_ScaleYy ), //Modification: Edited function names due to conflict with c_prop_coreball.cpp Formerly RecvProxy_ScaleY RecvPropFloat( RECVINFO( m_flScaleZ ), 0, RecvProxy_ScaleZz ), //Modification: Edited function names due to conflict with c_prop_coreball.cpp Formerly RecvProxy_ScaleZ RecvPropFloat( RECVINFO( m_flLerpTimeX ) ), RecvPropFloat( RECVINFO( m_flLerpTimeY ) ), RecvPropFloat( RECVINFO( m_flLerpTimeZ ) ), RecvPropFloat( RECVINFO( m_flGoalTimeX ) ), RecvPropFloat( RECVINFO( m_flGoalTimeY ) ), RecvPropFloat( RECVINFO( m_flGoalTimeZ ) ), END_RECV_TABLE() BEGIN_DATADESC( C_PropScalable ) DEFINE_AUTO_ARRAY( m_flTargetScale, FIELD_FLOAT ),
float m_CurrentDensity; float m_ParticleRadius; bool m_bStarted; PMaterialHandle m_MaterialHandle; SmokeParticleInfo *m_pSmokeParticleInfos; int m_xCount, m_yCount, m_zCount; float m_SpacingRadius; Vector m_MinColor; Vector m_MaxColor; }; IMPLEMENT_CLIENTCLASS_DT( C_FuncSmokeVolume, DT_FuncSmokeVolume, CFuncSmokeVolume ) RecvPropInt( RECVINFO( m_Color1 ), 0, RecvProxy_IntToColor32 ), RecvPropInt( RECVINFO( m_Color2 ), 0, RecvProxy_IntToColor32 ), RecvPropString( RECVINFO( m_MaterialName ) ), RecvPropFloat( RECVINFO( m_ParticleDrawWidth ) ), RecvPropFloat( RECVINFO( m_ParticleSpacingDistance ) ), RecvPropFloat( RECVINFO( m_DensityRampSpeed ) ), RecvPropFloat( RECVINFO( m_RotationSpeed ) ), RecvPropFloat( RECVINFO( m_MovementSpeed ) ), RecvPropFloat( RECVINFO( m_Density ) ), RecvPropDataTable( RECVINFO_DT( m_Collision ), 0, &REFERENCE_RECV_TABLE(DT_CollisionProperty) ), END_RECV_TABLE() // Helpers. // ------------------------------------------------------------------------- // static inline void InterpColor(unsigned char dest[4], unsigned char src1[4], unsigned char src2[4], float percent)
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "cbase.h" #include "c_physbox.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" IMPLEMENT_CLIENTCLASS_DT(C_PhysBox, DT_PhysBox, CPhysBox) RecvPropFloat(RECVINFO(m_mass), 0), // Test.. END_RECV_TABLE() C_PhysBox::C_PhysBox() { } //----------------------------------------------------------------------------- // Should this object cast shadows? //----------------------------------------------------------------------------- ShadowType_t C_PhysBox::ShadowCastType() { if (IsEffectActive(EF_NODRAW | EF_NOSHADOW)) return SHADOWS_NONE; return SHADOWS_RENDER_TO_TEXTURE; }
if ( isRescued && !pHostage->m_isRescued ) { // hostage was rescued pHostage->m_flDeadOrRescuedTime = gpGlobals->curtime + 2; pHostage->SetRenderMode( kRenderGlow ); pHostage->SetNextClientThink( gpGlobals->curtime ); } pHostage->m_isRescued = isRescued; } //----------------------------------------------------------------------------- IMPLEMENT_CLIENTCLASS_DT(C_CHostage, DT_CHostage, CHostage) RecvPropInt( RECVINFO( m_isRescued ), 0, C_CHostage::RecvProxy_Rescued ), RecvPropInt( RECVINFO( m_iHealth ) ), RecvPropInt( RECVINFO( m_iMaxHealth ) ), RecvPropInt( RECVINFO( m_lifeState ) ), RecvPropEHandle( RECVINFO( m_leader ) ), END_RECV_TABLE() //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- C_CHostage::C_CHostage() { g_Hostages.AddToTail( this );
#include "cbase.h" #include "run_stats.h" #include "mom_player_shared.h" #include "tier0/memdbgon.h" #ifdef CLIENT_DLL BEGIN_RECV_TABLE_NOBASE(C_MomRunStats, DT_MomRunStats) RecvPropInt(RECVINFO(m_iTotalZones), SPROP_UNSIGNED), //Keypress RecvPropArray3(RECVINFO_ARRAY(m_iZoneJumps), RecvPropInt(RECVINFO(m_iZoneJumps[0]), SPROP_UNSIGNED | SPROP_CHANGES_OFTEN)), RecvPropArray3(RECVINFO_ARRAY(m_iZoneStrafes), RecvPropInt(RECVINFO(m_iZoneStrafes[0]), SPROP_UNSIGNED | SPROP_CHANGES_OFTEN)), //Sync RecvPropArray3(RECVINFO_ARRAY(m_flZoneStrafeSyncAvg), RecvPropFloat(RECVINFO(m_flZoneStrafeSyncAvg[0]), SPROP_CHANGES_OFTEN)), RecvPropArray3(RECVINFO_ARRAY(m_flZoneStrafeSync2Avg), RecvPropFloat(RECVINFO(m_flZoneStrafeSync2Avg[0]), SPROP_CHANGES_OFTEN)), //Time RecvPropArray3(RECVINFO_ARRAY(m_iZoneEnterTick), RecvPropInt(RECVINFO(m_iZoneEnterTick[0]), SPROP_UNSIGNED)), RecvPropArray3(RECVINFO_ARRAY(m_iZoneTicks), RecvPropInt(RECVINFO(m_iZoneTicks[0]), SPROP_UNSIGNED)), //Velocity RecvPropArray3(RECVINFO_ARRAY(m_flZoneEnterSpeed3D), RecvPropFloat(RECVINFO(m_flZoneEnterSpeed3D[0]))), RecvPropArray3(RECVINFO_ARRAY(m_flZoneEnterSpeed2D), RecvPropFloat(RECVINFO(m_flZoneEnterSpeed2D[0]))), RecvPropArray3(RECVINFO_ARRAY(m_flZoneExitSpeed3D), RecvPropFloat(RECVINFO(m_flZoneExitSpeed3D[0]))), RecvPropArray3(RECVINFO_ARRAY(m_flZoneExitSpeed2D), RecvPropFloat(RECVINFO(m_flZoneExitSpeed2D[0]))), RecvPropArray3(RECVINFO_ARRAY(m_flZoneVelocityAvg3D), RecvPropFloat(RECVINFO(m_flZoneVelocityAvg3D[0]))), RecvPropArray3(RECVINFO_ARRAY(m_flZoneVelocityAvg2D), RecvPropFloat(RECVINFO(m_flZoneVelocityAvg2D[0]))), RecvPropArray3(RECVINFO_ARRAY(m_flZoneVelocityMax3D), RecvPropFloat(RECVINFO(m_flZoneVelocityMax3D[0]))), RecvPropArray3(RECVINFO_ARRAY(m_flZoneVelocityMax2D), RecvPropFloat(RECVINFO(m_flZoneVelocityMax2D[0]))), END_RECV_TABLE(); #else BEGIN_SEND_TABLE_NOBASE(CMomRunStats, DT_MomRunStats) SendPropInt(SENDINFO(m_iTotalZones), 7, SPROP_UNSIGNED),
pFireSmoke->m_flScaleTimeEnd = pFireSmoke->m_flScaleTimeStart; } else { pFireSmoke->m_flScaleTimeStart = Helper_GetTime(); pFireSmoke->m_flScaleTimeEnd = Helper_GetTime() + time; } } pFireSmoke->m_flScaleTime = time; } //Receive datatable IMPLEMENT_CLIENTCLASS_DT( C_FireSmoke, DT_FireSmoke, CFireSmoke ) RecvPropFloat( RECVINFO( m_flStartScale )), RecvPropFloat( RECVINFO( m_flScale ), 0, RecvProxy_Scale ), RecvPropFloat( RECVINFO( m_flScaleTime ), 0, RecvProxy_ScaleTime ), RecvPropInt( RECVINFO( m_nFlags ) ), RecvPropInt( RECVINFO( m_nFlameModelIndex ) ), RecvPropInt( RECVINFO( m_nFlameFromAboveModelIndex ) ), END_RECV_TABLE() //================================================== // C_FireSmoke //================================================== C_FireSmoke::C_FireSmoke() { } C_FireSmoke::~C_FireSmoke()
SendPropInt (SENDINFO(m_nAnimationParity), 3, SPROP_UNSIGNED ), SendPropEHandle (SENDINFO(m_hOwner)), SendPropInt( SENDINFO( m_nNewSequenceParity ), EF_PARITY_BITS, SPROP_UNSIGNED ), SendPropInt( SENDINFO( m_nResetEventsParity ), EF_PARITY_BITS, SPROP_UNSIGNED ), SendPropInt( SENDINFO( m_nMuzzleFlashParity ), EF_MUZZLEFLASH_BITS, SPROP_UNSIGNED ), #else RecvPropInt (RECVINFO(m_nModelIndex)), RecvPropEHandle (RECVINFO(m_hWeapon), RecvProxy_Weapon ), RecvPropInt (RECVINFO(m_nSkin)), RecvPropInt (RECVINFO(m_nBody)), RecvPropInt (RECVINFO(m_nSequence) ), RecvPropInt (RECVINFO(m_nViewModelIndex)), RecvPropFloat (RECVINFO(m_flPlaybackRate)), RecvPropInt (RECVINFO(m_fEffects), 0, RecvProxy_EffectFlags ), RecvPropInt (RECVINFO(m_nAnimationParity)), RecvPropEHandle (RECVINFO(m_hOwner)), RecvPropInt( RECVINFO( m_nNewSequenceParity )), RecvPropInt( RECVINFO( m_nResetEventsParity )), RecvPropInt( RECVINFO( m_nMuzzleFlashParity )), #endif END_NETWORK_TABLE() #ifdef CLIENT_DLL BEGIN_PREDICTION_DATA( CBaseViewModel ) // Networked
// Input : *pData - // *pStruct - // *pOut - //----------------------------------------------------------------------------- void RecvProxy_StunActive( const CRecvProxyData *pData, void *pStruct, void *pOut ) { bool state = *((bool *)&pData->m_Value.m_Int); C_WeaponStunStick *pWeapon = (C_WeaponStunStick *) pStruct; if ( state ) { // Turn on the effect pWeapon->StartStunEffect(); } else { // Turn off the effect pWeapon->StopStunEffect(); } *(bool *)pOut = state; } STUB_WEAPON_CLASS_IMPLEMENT( weapon_stunstick, C_WeaponStunStick ); IMPLEMENT_CLIENTCLASS_DT( C_WeaponStunStick, DT_WeaponStunStick, CWeaponStunStick ) RecvPropInt( RECVINFO(m_bActive), 0, RecvProxy_StunActive ), END_RECV_TABLE()
} void RecvProxy_ScaleZz( const CRecvProxyData *pData, void *pStruct, void *pOut ) { C_PropScalable *pCoreData = (C_PropScalable *) pStruct; pCoreData->m_flScaleZ = pData->m_Value.m_Float; if ( pCoreData->m_bRunningScale[2] == true ) { pCoreData->m_flTargetScale[2] = pCoreData->m_flCurrentScale[2]; } } IMPLEMENT_CLIENTCLASS_DT( C_PropScalable, DT_PropScalable, CPropScalable ) RecvPropFloat( RECVINFO( m_flScaleX ), 0, RecvProxy_ScaleXx ), RecvPropFloat( RECVINFO( m_flScaleY ), 0, RecvProxy_ScaleYy ), RecvPropFloat( RECVINFO( m_flScaleZ ), 0, RecvProxy_ScaleZz ), RecvPropFloat( RECVINFO( m_flLerpTimeX ) ), RecvPropFloat( RECVINFO( m_flLerpTimeY ) ), RecvPropFloat( RECVINFO( m_flLerpTimeZ ) ), RecvPropFloat( RECVINFO( m_flGoalTimeX ) ), RecvPropFloat( RECVINFO( m_flGoalTimeY ) ), RecvPropFloat( RECVINFO( m_flGoalTimeZ ) ), END_RECV_TABLE() BEGIN_DATADESC( C_PropScalable ) DEFINE_AUTO_ARRAY( m_flTargetScale, FIELD_FLOAT ),
#endif SendPropFloat( SENDINFO(m_flGlowProxySize ), 6, SPROP_ROUNDUP, 0.0f, MAX_GLOW_PROXY_SIZE), SendPropFloat( SENDINFO(m_flHDRColorScale ), 0, SPROP_NOSCALE, 0.0f, 100.0f), SendPropFloat( SENDINFO(m_flSpriteFramerate ), 8, SPROP_ROUNDUP, 0, 60.0f), SendPropFloat( SENDINFO(m_flFrame), 20, SPROP_ROUNDDOWN, 0.0f, 256.0f), SendPropFloat( SENDINFO(m_flBrightnessTime ), 0, SPROP_NOSCALE ), SendPropInt( SENDINFO(m_nBrightness), 8, SPROP_UNSIGNED ), SendPropBool( SENDINFO(m_bWorldSpaceScale) ), #else RecvPropEHandle(RECVINFO(m_hAttachedToEntity)), RecvPropInt(RECVINFO(m_nAttachment)), RecvPropFloat(RECVINFO(m_flScaleTime)), RecvPropFloat(RECVINFO(m_flSpriteScale), 0, RecvProxy_SpriteScale), RecvPropFloat(RECVINFO(m_flSpriteFramerate)), RecvPropFloat(RECVINFO(m_flGlowProxySize)), RecvPropFloat( RECVINFO(m_flHDRColorScale )), RecvPropFloat(RECVINFO(m_flFrame)), RecvPropFloat(RECVINFO(m_flBrightnessTime)), RecvPropInt(RECVINFO(m_nBrightness)), RecvPropBool( RECVINFO(m_bWorldSpaceScale) ), #endif END_NETWORK_TABLE() #ifdef CLIENT_DLL IMPLEMENT_PYCLIENTCLASS( C_Sprite, PN_SPRITE )
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ // // Purpose: // // $NoKeywords: $ //============================================================================= #include "cbase.h" #include "c_sun.h" IMPLEMENT_CLIENTCLASS_DT_NOBASE( C_Sun, DT_Sun, CSun ) RecvPropInt( RECVINFO(m_clrRender), 0, RecvProxy_IntToColor32 ), RecvPropVector( RECVINFO( m_vDirection ) ), RecvPropInt( RECVINFO( m_nLayers ) ), RecvPropInt( RECVINFO( m_bOn ) ), RecvPropInt( RECVINFO( m_HorzSize ) ), RecvPropInt( RECVINFO( m_VertSize ) ) END_RECV_TABLE() C_Sun::C_Sun() { m_Overlay.m_bDirectional = true; m_Overlay.m_bInSky = true; } C_Sun::~C_Sun() {
SendPropInt( SENDINFO( m_bIsLive ), 1, SPROP_UNSIGNED ), // SendPropTime( SENDINFO( m_flDetonateTime ) ), SendPropEHandle( SENDINFO( m_hThrower ) ), SendPropVector( SENDINFO( m_vecVelocity ), 0, SPROP_NOSCALE ), // HACK: Use same flag bits as player for now SendPropInt ( SENDINFO(m_fFlags), PLAYER_FLAG_BITS, SPROP_UNSIGNED, SendProxy_CropFlagsToPlayerFlagBitsLength ), #else RecvPropFloat( RECVINFO( m_flDamage ) ), RecvPropFloat( RECVINFO( m_DmgRadius ) ), RecvPropInt( RECVINFO( m_bIsLive ) ), // RecvPropTime( RECVINFO( m_flDetonateTime ) ), RecvPropEHandle( RECVINFO( m_hThrower ) ), // Need velocity from grenades to make animation system work correctly when running RecvPropVector( RECVINFO(m_vecVelocity), 0, RecvProxy_LocalVelocity ), RecvPropInt( RECVINFO( m_fFlags ) ), #endif END_NETWORK_TABLE() LINK_ENTITY_TO_CLASS( grenade, CBaseGrenade ); #if defined( CLIENT_DLL ) BEGIN_PREDICTION_DATA( CBaseGrenade ) DEFINE_PRED_FIELD( m_hThrower, FIELD_EHANDLE, FTYPEDESC_INSENDTABLE ), DEFINE_PRED_FIELD( m_bIsLive, FIELD_BOOLEAN, FTYPEDESC_INSENDTABLE ), DEFINE_PRED_FIELD( m_DmgRadius, FIELD_BOOLEAN, FTYPEDESC_INSENDTABLE ), // DEFINE_PRED_FIELD_TOL( m_flDetonateTime, FIELD_FLOAT, FTYPEDESC_INSENDTABLE, TD_MSECTOLERANCE ),
{ pTimer->InternalSetPaused( bTimerPaused ); } } #endif LINK_ENTITY_TO_CLASS( team_round_timer, CTeamRoundTimer ); PRECACHE_REGISTER( team_round_timer ); IMPLEMENT_NETWORKCLASS_ALIASED( TeamRoundTimer, DT_TeamRoundTimer ) BEGIN_NETWORK_TABLE_NOBASE( CTeamRoundTimer, DT_TeamRoundTimer ) #ifdef CLIENT_DLL RecvPropInt( RECVINFO( m_bTimerPaused ), 0, RecvProxy_TimerPaused ), RecvPropTime( RECVINFO( m_flTimeRemaining ) ), RecvPropTime( RECVINFO( m_flTimerEndTime ) ), RecvPropInt( RECVINFO( m_nTimerMaxLength ) ), RecvPropBool( RECVINFO( m_bIsDisabled ) ), RecvPropBool( RECVINFO( m_bShowInHUD ) ), RecvPropInt( RECVINFO( m_nTimerLength ) ), RecvPropInt( RECVINFO( m_nTimerInitialLength ) ), RecvPropBool( RECVINFO( m_bAutoCountdown ) ), RecvPropInt( RECVINFO( m_nSetupTimeLength ) ), RecvPropInt( RECVINFO( m_nState ) ), RecvPropBool( RECVINFO( m_bStartPaused ) ), RecvPropBool( RECVINFO( m_bInCaptureWatchState ) ), RecvPropBool( RECVINFO( m_bStopWatchTimer ) ), RecvPropTime( RECVINFO( m_flTotalTime ) ),
pTeam->m_aPlayers.SetSize( currentArrayLength ); } void RecvProxy_KitName( const CRecvProxyData *pData, void *pStruct, void *pOut ) { ((C_Team *)pStruct)->SetKitName(pData->m_Value.m_pString); } IMPLEMENT_CLIENTCLASS_DT_NOBASE(C_Team, DT_Team, CTeam) RecvPropInt( RECVINFO(m_iTeamNum)), RecvPropInt( RECVINFO(m_nPenaltyGoals) ), RecvPropInt( RECVINFO(m_nPenaltyGoalBits) ), RecvPropInt( RECVINFO(m_nPenaltyRound) ), RecvPropInt( RECVINFO(m_nTimeoutsLeft) ), RecvPropInt( RECVINFO(m_nTimeoutTimeLeft) ), RecvPropString( RECVINFO(m_szServerKitName), 0, RecvProxy_KitName), RecvPropString( RECVINFO(m_szServerCode) ), RecvPropString( RECVINFO(m_szServerShortName) ), RecvPropVector(RECVINFO(m_vCornerLeft)), RecvPropVector(RECVINFO(m_vCornerRight)), RecvPropVector(RECVINFO(m_vGoalkickLeft)), RecvPropVector(RECVINFO(m_vGoalkickRight)), RecvPropVector(RECVINFO(m_vPenalty)), RecvPropVector(RECVINFO(m_vGoalCenter)), RecvPropVector(RECVINFO(m_vPenBoxMin)), RecvPropVector(RECVINFO(m_vPenBoxMax)), RecvPropVector(RECVINFO(m_vSixYardBoxMin)), RecvPropVector(RECVINFO(m_vSixYardBoxMax)), RecvPropInt(RECVINFO(m_nForward)), RecvPropInt(RECVINFO(m_nRight)),
SendPropInt (SENDINFO(m_nAnimationParity), 3, SPROP_UNSIGNED ), SendPropEHandle (SENDINFO(m_hWeapon)), SendPropEHandle (SENDINFO(m_hOwner)), SendPropInt( SENDINFO( m_nNewSequenceParity ), EF_PARITY_BITS, SPROP_UNSIGNED ), SendPropInt( SENDINFO( m_nResetEventsParity ), EF_PARITY_BITS, SPROP_UNSIGNED ), SendPropInt( SENDINFO( m_nMuzzleFlashParity ), EF_MUZZLEFLASH_BITS, SPROP_UNSIGNED ), #if !defined( INVASION_DLL ) && !defined( INVASION_CLIENT_DLL ) SendPropArray (SendPropFloat(SENDINFO_ARRAY(m_flPoseParameter), 8, 0, 0.0f, 1.0f), m_flPoseParameter), #endif #else RecvPropInt (RECVINFO(m_nModelIndex)), RecvPropInt (RECVINFO(m_nSkin)), RecvPropInt (RECVINFO(m_nBody)), RecvPropInt (RECVINFO(m_nSequence), 0, RecvProxy_SequenceNum ), RecvPropInt (RECVINFO(m_nViewModelIndex)), RecvPropFloat (RECVINFO(m_flPlaybackRate)), RecvPropInt (RECVINFO(m_fEffects), 0, RecvProxy_EffectFlags ), RecvPropInt (RECVINFO(m_nAnimationParity)), RecvPropEHandle (RECVINFO(m_hWeapon), RecvProxy_Weapon ), RecvPropEHandle (RECVINFO(m_hOwner)), RecvPropInt( RECVINFO( m_nNewSequenceParity )), RecvPropInt( RECVINFO( m_nResetEventsParity )), RecvPropInt( RECVINFO( m_nMuzzleFlashParity )), #if !defined( INVASION_DLL ) && !defined( INVASION_CLIENT_DLL ) RecvPropArray(RecvPropFloat(RECVINFO(m_flPoseParameter[0]) ), m_flPoseParameter ), #endif #endif
void RecvProxy_ForcedClientTime( const CRecvProxyData *pData, void *pStruct, void *pOut ) { C_SceneEntity *pScene = reinterpret_cast< C_SceneEntity * >( pStruct ); *(float *)pOut = pData->m_Value.m_Float; pScene->OnResetClientTime(); } #if defined( CSceneEntity ) #undef CSceneEntity #endif IMPLEMENT_CLIENTCLASS_DT(C_SceneEntity, DT_SceneEntity, CSceneEntity) RecvPropInt(RECVINFO(m_nSceneStringIndex)), RecvPropBool(RECVINFO(m_bIsPlayingBack)), RecvPropBool(RECVINFO(m_bPaused)), RecvPropFloat(RECVINFO(m_flForceClientTime), 0, RecvProxy_ForcedClientTime ), RecvPropUtlVector( RECVINFO_UTLVECTOR( m_hActorList ), MAX_ACTORS_IN_SCENE, RecvPropEHandle(NULL, 0, 0)), END_RECV_TABLE() C_SceneEntity::C_SceneEntity( void ) { m_pScene = NULL; } C_SceneEntity::~C_SceneEntity( void ) { UnloadScene(); }
} void BoxProxy_ScaleZ( const CRecvProxyData *pData, void *pStruct, void *pOut ) { C_PropPuzzleBox *pCoreData = (C_PropPuzzleBox *) pStruct; pCoreData->m_flScaleZ = pData->m_Value.m_Float; if ( pCoreData->m_bRunningScale[2] == true ) { pCoreData->m_flTargetScale[2] = pCoreData->m_flCurrentScale[2]; } } IMPLEMENT_CLIENTCLASS_DT( C_PropPuzzleBox, DT_PropPuzzleBox, CPuzzleBox ) RecvPropFloat( RECVINFO( m_flScaleX ), 0, BoxProxy_ScaleX ), RecvPropFloat( RECVINFO( m_flScaleY ), 0, BoxProxy_ScaleY ), RecvPropFloat( RECVINFO( m_flScaleZ ), 0, BoxProxy_ScaleZ ), RecvPropFloat( RECVINFO( m_flLerpTimeX ) ), RecvPropFloat( RECVINFO( m_flLerpTimeY ) ), RecvPropFloat( RECVINFO( m_flLerpTimeZ ) ), RecvPropFloat( RECVINFO( m_flGoalTimeX ) ), RecvPropFloat( RECVINFO( m_flGoalTimeY ) ), RecvPropFloat( RECVINFO( m_flGoalTimeZ ) ), END_RECV_TABLE() BEGIN_DATADESC( C_PropPuzzleBox ) DEFINE_AUTO_ARRAY( m_flTargetScale, FIELD_FLOAT ),
RECVINFO_ARRAY( m_hAttachEntity ), RecvPropEHandle (RECVINFO(m_hAttachEntity[0])) ), RecvPropArray3 ( RECVINFO_ARRAY( m_nAttachIndex ), RecvPropInt (RECVINFO(m_nAttachIndex[0])) ), RecvPropInt (RECVINFO(m_nHaloIndex)), RecvPropFloat (RECVINFO(m_fHaloScale)), RecvPropFloat (RECVINFO(m_fWidth)), RecvPropFloat (RECVINFO(m_fEndWidth)), RecvPropFloat (RECVINFO(m_fFadeLength)), RecvPropFloat (RECVINFO(m_fAmplitude)), RecvPropFloat (RECVINFO(m_fStartFrame)), RecvPropFloat (RECVINFO(m_fSpeed), 0, RecvProxy_Beam_ScrollSpeed ), RecvPropFloat(RECVINFO(m_flFrameRate)), RecvPropFloat(RECVINFO(m_flHDRColorScale)), RecvPropInt(RECVINFO(m_clrRender)), RecvPropInt(RECVINFO(m_nRenderFX)), RecvPropInt(RECVINFO(m_nRenderMode)), RecvPropFloat(RECVINFO(m_flFrame)), RecvPropVector(RECVINFO(m_vecEndPos)), #ifdef PORTAL RecvPropBool(RECVINFO(m_bDrawInMainRender) ), RecvPropBool(RECVINFO(m_bDrawInPortalRender) ), #endif RecvPropInt(RECVINFO(m_nModelIndex)), RecvPropInt(RECVINFO(m_nMinDXLevel)), RecvPropVector(RECVINFO_NAME(m_vecNetworkOrigin, m_vecOrigin)),
static void SendProxy_Solid( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID ) { pOut->m_Int = ((CCollisionProperty*)pStruct)->GetSolid(); } static void SendProxy_SolidFlags( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID ) { pOut->m_Int = ((CCollisionProperty*)pStruct)->GetSolidFlags(); } #endif BEGIN_NETWORK_TABLE_NOBASE( CCollisionProperty, DT_CollisionProperty ) #ifdef CLIENT_DLL RecvPropVector( RECVINFO(m_vecMins), 0, RecvProxy_OBBMins ), RecvPropVector( RECVINFO(m_vecMaxs), 0, RecvProxy_OBBMaxs ), RecvPropInt( RECVINFO( m_nSolidType ), 0, RecvProxy_Solid ), RecvPropInt( RECVINFO( m_usSolidFlags ), 0, RecvProxy_SolidFlags ), RecvPropInt( RECVINFO(m_nSurroundType), 0, RecvProxy_IntDirtySurround ), RecvPropInt( RECVINFO(m_triggerBloat), 0, RecvProxy_IntDirtySurround ), RecvPropVector( RECVINFO(m_vecSpecifiedSurroundingMins), 0, RecvProxy_VectorDirtySurround ), RecvPropVector( RECVINFO(m_vecSpecifiedSurroundingMaxs), 0, RecvProxy_VectorDirtySurround ), #else SendPropVector( SENDINFO(m_vecMins), 0, SPROP_NOSCALE), SendPropVector( SENDINFO(m_vecMaxs), 0, SPROP_NOSCALE), SendPropInt( SENDINFO( m_nSolidType ), 3, SPROP_UNSIGNED, SendProxy_Solid ), SendPropInt( SENDINFO( m_usSolidFlags ), FSOLID_MAX_BITS, SPROP_UNSIGNED, SendProxy_SolidFlags ), SendPropInt( SENDINFO( m_nSurroundType ), SURROUNDING_TYPE_BIT_COUNT, SPROP_UNSIGNED ), SendPropInt( SENDINFO(m_triggerBloat), 0, SPROP_UNSIGNED), SendPropVector( SENDINFO(m_vecSpecifiedSurroundingMins), 0, SPROP_NOSCALE),