DEFINE_FIELD( m_iMaterialName, FIELD_MATERIALINDEX ), DEFINE_EMBEDDED( m_Info ), DEFINE_FIELD( m_hConstraintEntity, FIELD_EHANDLE ), // Think this should be handled by StartTouch/etc. // DEFINE_FIELD( m_nRefCount, FIELD_INTEGER ), END_DATADESC() //----------------------------------------------------------------------------- // Networking //----------------------------------------------------------------------------- IMPLEMENT_SERVERCLASS_ST( CEntityParticleTrail, DT_EntityParticleTrail ) SendPropInt(SENDINFO(m_iMaterialName), MAX_MATERIAL_STRING_BITS, SPROP_UNSIGNED ), SendPropDataTable( SENDINFO_DT( m_Info ), &REFERENCE_SEND_TABLE( DT_EntityParticleTrailInfo ) ), SendPropEHandle(SENDINFO(m_hConstraintEntity)), END_SEND_TABLE() LINK_ENTITY_TO_CLASS( env_particle_trail, CEntityParticleTrail ); //----------------------------------------------------------------------------- // Purpose: Creates a flame and attaches it to a target entity. // Input : pTarget - //----------------------------------------------------------------------------- CEntityParticleTrail *CEntityParticleTrail::Create( CBaseEntity *pTarget, const EntityParticleTrailInfo_t &info, CBaseEntity *pConstraintEntity ) { int iMaterialName = GetMaterialIndex( STRING(info.m_strMaterialName) );
//----------------------------------------------------------------------------- CTEEffectDispatch::CTEEffectDispatch( const char *name ) : CBaseTempEntity( name ) { } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- CTEEffectDispatch::~CTEEffectDispatch( void ) { } IMPLEMENT_SERVERCLASS_ST( CTEEffectDispatch, DT_TEEffectDispatch ) SendPropDataTable( SENDINFO_DT( m_EffectData ), &REFERENCE_SEND_TABLE( DT_EffectData ) ) END_SEND_TABLE() // Singleton to fire TEEffectDispatch objects static CTEEffectDispatch g_TEEffectDispatch( "EffectDispatch" ); //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void TE_DispatchEffect( IRecipientFilter& filter, float delay, const Vector &pos, const char *pName, const CEffectData &data ) { // Copy the supplied effect data. g_TEEffectDispatch.m_EffectData = data;
SendPropInt( NULL, 0, sizeof( char ), 0 ) ), SendPropUtlVector( SENDINFO_UTLVECTOR( m_UtlVectorFloat ), MAX_FLOATARRAY_ELEMENTS, // max elements SendPropFloat( NULL, 0, 0, 0, SPROP_NOSCALE ) ) END_SEND_TABLE() BEGIN_SEND_TABLE_NOBASE(DTTestSub2Sub, DT_DTTestSub2Sub) SendPropInt( SENDINFO_NOCHECK( m_Int2 ), 32 ), END_SEND_TABLE() BEGIN_SEND_TABLE_NOBASE(DTTestSub2, DT_DTTestSub2) SendPropDataTable(SENDINFO_DT(m_Sub), &REFERENCE_SEND_TABLE(DT_DTTestSub2Sub)), SendPropInt( SENDINFO_NOCHECK( m_Int ), 32 ), END_SEND_TABLE() // ------------------------------------------------------------------------------------------- // // DTTestServer and its DataTable. // ------------------------------------------------------------------------------------------- // class DTTestServer { public: DTTestServerSub m_Sub; DTTestSub2 m_Sub2; float m_Float;
public: }; IMPLEMENT_SERVERCLASS_ST_NOBASE( CFunc_Dust, DT_Func_Dust ) SendPropInt( SENDINFO(m_Color), 32, SPROP_UNSIGNED ), SendPropInt( SENDINFO(m_SpawnRate), 12, SPROP_UNSIGNED ), SendPropInt( SENDINFO(m_SpeedMax), 12, SPROP_UNSIGNED ), SendPropFloat( SENDINFO(m_flSizeMin), 0, SPROP_NOSCALE ), SendPropFloat( SENDINFO(m_flSizeMax), 0, SPROP_NOSCALE ), SendPropInt( SENDINFO(m_DistMax), 16, SPROP_UNSIGNED ), SendPropInt( SENDINFO(m_LifetimeMin), 4, SPROP_UNSIGNED ), SendPropInt( SENDINFO(m_LifetimeMax), 4, SPROP_UNSIGNED ), SendPropInt( SENDINFO(m_DustFlags), DUST_NUMFLAGS, SPROP_UNSIGNED ), SendPropModelIndex( SENDINFO(m_nModelIndex) ), SendPropDataTable( SENDINFO_DT( m_Collision ), &REFERENCE_SEND_TABLE(DT_CollisionProperty) ), END_SEND_TABLE() BEGIN_DATADESC( CFunc_Dust ) DEFINE_FIELD( CFunc_Dust, m_DustFlags,FIELD_INTEGER ), DEFINE_KEYFIELD( CFunc_Dust, m_Color, FIELD_COLOR32, "Color" ), DEFINE_KEYFIELD( CFunc_Dust, m_SpawnRate, FIELD_INTEGER, "SpawnRate" ), DEFINE_KEYFIELD( CFunc_Dust, m_flSizeMin, FIELD_FLOAT, "SizeMin" ), DEFINE_KEYFIELD( CFunc_Dust, m_flSizeMax, FIELD_FLOAT, "SizeMax" ), DEFINE_KEYFIELD( CFunc_Dust, m_SpeedMax, FIELD_INTEGER, "SpeedMax" ), DEFINE_KEYFIELD( CFunc_Dust, m_LifetimeMin, FIELD_INTEGER, "LifetimeMin" ), DEFINE_KEYFIELD( CFunc_Dust, m_LifetimeMax, FIELD_INTEGER, "LifetimeMax" ), DEFINE_KEYFIELD( CFunc_Dust, m_DistMax, FIELD_INTEGER, "DistMax" ),
DEFINE_PRED_FIELD( m_flSpawnSpeed, FIELD_FLOAT, FTYPEDESC_INSENDTABLE ), END_PREDICTION_DATA() BEGIN_PREDICTION_DATA_NO_BASE( PositionHistory_t ) DEFINE_FIELD( m_Position, FIELD_VECTOR ), DEFINE_FIELD( m_Time, FIELD_FLOAT ), END_PREDICTION_DATA() IMPLEMENT_NETWORKCLASS_ALIASED( BasePlasmaProjectile, DT_BasePlasmaProjectile) BEGIN_NETWORK_TABLE( CBasePlasmaProjectile, DT_BasePlasmaProjectile ) #if !defined( CLIENT_DLL ) SendPropDataTable(SENDINFO_DT(m_Shared), &REFERENCE_SEND_TABLE(DT_PlasmaProjectileShared)), SendPropExclude( "DT_BaseEntity", "m_vecVelocity" ), SendPropExclude( "DT_BaseEntity", "m_vecAbsOrigin" ), //SendPropVector(SENDINFO(m_vecGunOriginOffset), 0, SPROP_COORD), #else RecvPropDataTable(RECVINFO_DT(m_Shared), 0, &REFERENCE_RECV_TABLE(DT_PlasmaProjectileShared)), //RecvPropVector(RECVINFO(m_vecGunOriginOffset)), #endif END_NETWORK_TABLE() LINK_ENTITY_TO_CLASS( base_plasmaprojectile, CBasePlasmaProjectile ); PRECACHE_REGISTER(base_plasmaprojectile);
DEFINE_INPUTFUNC( FIELD_VOID, "OpenCanister", InputOpenCanister ), DEFINE_INPUTFUNC( FIELD_VOID, "SpawnHeadcrabs", InputSpawnHeadcrabs ), DEFINE_INPUTFUNC( FIELD_VOID, "StopSmoke", InputStopSmoke ), // Outputs DEFINE_OUTPUT( m_OnLaunched, "OnLaunched" ), DEFINE_OUTPUT( m_OnImpacted, "OnImpacted" ), DEFINE_OUTPUT( m_OnOpened, "OnOpened" ), END_DATADESC() EXTERN_SEND_TABLE(DT_EnvHeadcrabCanisterShared); IMPLEMENT_SERVERCLASS_ST( CEnvHeadcrabCanister, DT_EnvHeadcrabCanister ) SendPropDataTable( SENDINFO_DT( m_Shared ), &REFERENCE_SEND_TABLE(DT_EnvHeadcrabCanisterShared) ), SendPropBool( SENDINFO( m_bLanded ) ), END_SEND_TABLE() //----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- CEnvHeadcrabCanister::CEnvHeadcrabCanister() { m_flMinRefireTime = -1.0f; m_flMaxRefireTime = -1.0f; } //-----------------------------------------------------------------------------
#include "mom_triggers.h" #include "mom_replay_entity.h" #include "tier0/memdbgon.h" #define AVERAGE_STATS_INTERVAL 0.1 IMPLEMENT_SERVERCLASS_ST(CMomentumPlayer, DT_MOM_Player) SendPropInt(SENDINFO(m_iShotsFired)), SendPropInt(SENDINFO(m_iDirection)), SendPropBool(SENDINFO(m_bResumeZoom)), SendPropInt(SENDINFO(m_iLastZoom)), SendPropBool(SENDINFO(m_bDidPlayerBhop)), SendPropInt(SENDINFO(m_iSuccessiveBhops)), SendPropBool(SENDINFO(m_bHasPracticeMode)), SendPropDataTable(SENDINFO_DT(m_RunData), &REFERENCE_SEND_TABLE(DT_MOM_RunEntData)), SendPropDataTable(SENDINFO_DT(m_RunStats), &REFERENCE_SEND_TABLE(DT_MOM_RunStats)), END_SEND_TABLE(); BEGIN_DATADESC(CMomentumPlayer) DEFINE_THINKFUNC(CheckForBhop), DEFINE_THINKFUNC(UpdateRunStats), DEFINE_THINKFUNC(CalculateAverageStats), DEFINE_THINKFUNC(LimitSpeedInStartZone), END_DATADESC(); LINK_ENTITY_TO_CLASS(player, CMomentumPlayer); PRECACHE_REGISTER(player); CMomentumPlayer::CMomentumPlayer() : m_duckUntilOnGround(false), m_flStamina(0), m_flTicksOnGround(0), m_flLastVelocity(0), m_flLastSyncVelocity(0),
IMPLEMENT_SERVERCLASS_ST( CSDKPlayer, DT_SDKPlayer ) 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_BaseEntity", "m_angRotation" ), SendPropExclude( "DT_BaseAnimatingOverlay", "overlay_vars" ), SendPropExclude( "DT_BaseEntity", "m_vecOrigin" ), // playeranimstate and clientside animation takes care of these on the client SendPropExclude( "DT_ServerAnimationData" , "m_flCycle" ), SendPropExclude( "DT_AnimTimeMustBeFirst" , "m_flAnimTime" ), // Data that only gets sent to the local player. SendPropDataTable( SENDINFO_DT( m_Shared ), &REFERENCE_SEND_TABLE( DT_SDKPlayerShared ) ), // Data that only gets sent to the local player. SendPropDataTable( "sdklocaldata", 0, &REFERENCE_SEND_TABLE(DT_SDKLocalPlayerExclusive), SendProxy_SendLocalDataTable ), // Data that gets sent to all other players SendPropDataTable( "sdknonlocaldata", 0, &REFERENCE_SEND_TABLE(DT_SDKNonLocalPlayerExclusive), SendProxy_SendNonLocalDataTable ), SendPropEHandle( SENDINFO( m_hRagdoll ) ), SendPropInt( SENDINFO( m_iPlayerState ), Q_log2( NUM_PLAYER_STATES )+1, SPROP_UNSIGNED ), SendPropBool( SENDINFO( m_bSpawnInterpCounter ) ), END_SEND_TABLE() class CSDKRagdoll : public CBaseAnimatingOverlay
#include "tier0/memdbgon.h" #ifdef CLIENT_DLL EXTERN_RECV_TABLE( DT_ScriptCreatedItem ) #else EXTERN_SEND_TABLE( DT_ScriptCreatedItem ) #endif IMPLEMENT_NETWORKCLASS_ALIASED( EconEntity, DT_EconEntity ) BEGIN_NETWORK_TABLE( CEconEntity, DT_EconEntity ) #ifdef CLIENT_DLL RecvPropDataTable( RECVINFO_DT( m_Item ), 0, &REFERENCE_RECV_TABLE( DT_ScriptCreatedItem ) ), RecvPropDataTable( RECVINFO_DT( m_AttributeManager ), 0, &REFERENCE_RECV_TABLE( DT_AttributeContainer ) ), #else SendPropDataTable( SENDINFO_DT( m_Item ), &REFERENCE_SEND_TABLE( DT_ScriptCreatedItem ) ), SendPropDataTable( SENDINFO_DT( m_AttributeManager ), &REFERENCE_SEND_TABLE( DT_AttributeContainer ) ), #endif END_NETWORK_TABLE() #ifdef CLIENT_DLL BEGIN_PREDICTION_DATA( C_EconEntity ) DEFINE_PRED_TYPEDESCRIPTION( m_AttributeManager, CAttributeContainer ), END_PREDICTION_DATA() #endif CEconEntity::CEconEntity() { m_pAttributes = this; }