//Networking IMPLEMENT_SERVERCLASS_ST(CSmokeStack, DT_SmokeStack) SendPropFloat(SENDINFO(m_SpreadSpeed), 0, SPROP_NOSCALE), SendPropFloat(SENDINFO(m_Speed), 0, SPROP_NOSCALE), SendPropFloat(SENDINFO(m_StartSize), 0, SPROP_NOSCALE), SendPropFloat(SENDINFO(m_EndSize), 0, SPROP_NOSCALE), SendPropFloat(SENDINFO(m_Rate), 0, SPROP_NOSCALE), SendPropFloat(SENDINFO(m_JetLength), 0, SPROP_NOSCALE), SendPropInt(SENDINFO(m_bEmit), 1, SPROP_UNSIGNED), SendPropFloat(SENDINFO(m_flBaseSpread), 0, SPROP_NOSCALE), SendPropFloat(SENDINFO( m_flRollSpeed ), 0, SPROP_NOSCALE ), // Note: the base color is specified in the smokestack entity, but the directional // and ambient light must come from env_particlelight entities. SendPropVector( SENDINFO_NOCHECK(m_DirLight.m_vPos), 0, SPROP_NOSCALE ), SendPropVector( SENDINFO_NOCHECK(m_DirLight.m_vColor), 0, SPROP_NOSCALE ), SendPropFloat( SENDINFO_NOCHECK(m_DirLight.m_flIntensity), 0, SPROP_NOSCALE ), SendPropVector( SENDINFO_NOCHECK(m_AmbientLight.m_vPos), 0, SPROP_NOSCALE ), SendPropVector( SENDINFO_NOCHECK(m_AmbientLight.m_vColor), 0, SPROP_NOSCALE ), SendPropFloat( SENDINFO_NOCHECK(m_AmbientLight.m_flIntensity), 0, SPROP_NOSCALE ), SendPropVector(SENDINFO(m_vWind), 0, SPROP_NOSCALE), SendPropFloat(SENDINFO(m_flTwist), 0, SPROP_NOSCALE), SendPropIntWithMinusOneFlag( SENDINFO(m_iMaterialModel), 16 ) END_SEND_TABLE() LINK_ENTITY_TO_CLASS( env_smokestack, CSmokeStack );
void SendProxy_DTTestServerSubString( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID ) { SendProxy_StringToString( pProp, pStruct, pData, pOut, iElement, objectID); } BEGIN_SEND_TABLE_NOBASE( CTestStruct, DT_TestStruct ) SendPropInt( SENDINFO_NOCHECK( a ) ), SendPropInt( SENDINFO_NOCHECK( b ) ), SendPropFloat( SENDINFO_NOCHECK( f ) ) END_SEND_TABLE() BEGIN_SEND_TABLE_NOBASE(DTTestServerSub, DT_DTTestSub) // - Auto type conversions (receiving an array of floats into an array of ints). SendPropArray( SendPropFloat(SENDINFO_NOCHECK(m_FloatArray[0]), 0, SPROP_NOSCALE), m_FloatArray), SendPropUtlVectorDataTable( m_UtlVectorStruct, MAX_STRUCTARRAY_ELEMENTS, DT_TestStruct ), SendPropArray( SendPropString(SENDINFO_NOCHECK(m_Strings[0]), 0, SendProxy_DTTestServerSubString), m_Strings ), SendPropUtlVector( SENDINFO_UTLVECTOR( m_UtlVectorChar ), MAX_CHARARRAY_ELEMENTS, SendPropInt( NULL, 0, sizeof( char ), 0 ) ), SendPropUtlVector( SENDINFO_UTLVECTOR( m_UtlVectorFloat ),
static CTETFExplosion g_TETFExplosion( "TFExplosion" ); //----------------------------------------------------------------------------- // Purpose: // Input : *name - //----------------------------------------------------------------------------- CTETFExplosion::CTETFExplosion( const char *name ) : CBaseTempEntity( name ) { m_vecOrigin.Init(); m_vecNormal.Init(); m_iWeaponID = TF_WEAPON_NONE; m_nEntIndex = 0; } IMPLEMENT_SERVERCLASS_ST( CTETFExplosion, DT_TETFExplosion ) SendPropFloat( SENDINFO_NOCHECK( m_vecOrigin[0] ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_NOCHECK( m_vecOrigin[1] ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_NOCHECK( m_vecOrigin[2] ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropVector( SENDINFO_NOCHECK( m_vecNormal ), 6, 0, -1.0f, 1.0f ), SendPropInt( SENDINFO_NOCHECK( m_iWeaponID ), Q_log2( TF_WEAPON_COUNT )+1, SPROP_UNSIGNED ), SendPropInt( SENDINFO_NAME( m_nEntIndex, entindex ), MAX_EDICT_BITS ), END_SEND_TABLE() void TE_TFExplosion( IRecipientFilter &filter, float flDelay, const Vector &vecOrigin, const Vector &vecNormal, int iWeaponID, int nEntIndex ) { VectorCopy( vecOrigin, g_TETFExplosion.m_vecOrigin ); VectorCopy( vecNormal, g_TETFExplosion.m_vecNormal ); g_TETFExplosion.m_iWeaponID = iWeaponID; g_TETFExplosion.m_nEntIndex = nEntIndex; // Send it over the wire
RecvPropFloat( RECVINFO( m_ControlPoint1.m_vecOffset[2] ) ), END_RECV_TABLE() #else #include "dt_send.h" BEGIN_SEND_TABLE_NOBASE( CEffectData, DT_EffectData ) // Everything uses _NOCHECK here since this is not an entity and we don't need // the functionality of CNetworkVars. // Get half-inch precision here. #ifdef HL2_DLL SendPropFloat( SENDINFO_NOCHECK( m_vOrigin[0] ), COORD_INTEGER_BITS+SUBINCH_PRECISION, 0, MIN_COORD_INTEGER, MAX_COORD_INTEGER ), SendPropFloat( SENDINFO_NOCHECK( m_vOrigin[1] ), COORD_INTEGER_BITS+SUBINCH_PRECISION, 0, MIN_COORD_INTEGER, MAX_COORD_INTEGER ), SendPropFloat( SENDINFO_NOCHECK( m_vOrigin[2] ), COORD_INTEGER_BITS+SUBINCH_PRECISION, 0, MIN_COORD_INTEGER, MAX_COORD_INTEGER ), SendPropFloat( SENDINFO_NOCHECK( m_vStart[0] ), COORD_INTEGER_BITS+SUBINCH_PRECISION, 0, MIN_COORD_INTEGER, MAX_COORD_INTEGER ), SendPropFloat( SENDINFO_NOCHECK( m_vStart[1] ), COORD_INTEGER_BITS+SUBINCH_PRECISION, 0, MIN_COORD_INTEGER, MAX_COORD_INTEGER ), SendPropFloat( SENDINFO_NOCHECK( m_vStart[2] ), COORD_INTEGER_BITS+SUBINCH_PRECISION, 0, MIN_COORD_INTEGER, MAX_COORD_INTEGER ), #else SendPropFloat( SENDINFO_NOCHECK( m_vOrigin[0] ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_NOCHECK( m_vOrigin[1] ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_NOCHECK( m_vOrigin[2] ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_NOCHECK( m_vStart[0] ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_NOCHECK( m_vStart[1] ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_NOCHECK( m_vStart[2] ), -1, SPROP_COORD_MP_INTEGRAL ), #endif SendPropQAngles( SENDINFO_NOCHECK( m_vAngles ), 7 ),