Ejemplo n.º 1
0
DataTableProp PropVector(
	const char *pVarName,
	int offset,
	int sizeofVar,
	int nBits,					// Number of bits (for each floating-point component) to use when encoding.
	int flags,
	float fLowValue,			// For floating point, low and high values.
	float fHighValue	// High value. If HIGH_DEFAULT, it's (1<<nBits).
	)
{
#if !defined (CLIENT_DLL)
	return SendPropVector( pVarName, offset, sizeofVar, nBits, flags, fLowValue, fHighValue );
#else
	return RecvPropVector( pVarName, offset, sizeofVar, flags );
#endif
}
Ejemplo n.º 2
0
private:
	C_NPC_Surface( const C_NPC_Surface & ); // not defined, not accessible
};


//-----------------------------------------------------------------------------
// Purpose: setup network receive table
//-----------------------------------------------------------------------------

IMPLEMENT_CLIENTCLASS_DT(C_NPC_Surface, DT_NPC_Surface, CNPC_Surface)
	RecvPropFloat	( RECVINFO( m_flRadius ) ),
	RecvPropInt		( RECVINFO( m_nActiveParticles ) ),
	RecvPropUtlVector( 
		RECVINFO_UTLVECTOR( m_vecSurfacePos ), 
		MAX_SURFACE_ELEMENTS,
		RecvPropVector(NULL, 0, sizeof( Vector ))),
	RecvPropUtlVector( 
		RECVINFO_UTLVECTOR( m_flSurfaceV ), 
		MAX_SURFACE_ELEMENTS,
		RecvPropFloat(NULL, 0, sizeof( float ))),
	RecvPropUtlVector( 
		RECVINFO_UTLVECTOR( m_flSurfaceR ), 
		MAX_SURFACE_ELEMENTS,
		RecvPropFloat(NULL, 0, sizeof( float ))),
END_RECV_TABLE()

//-----------------------------------------------------------------------------
// Purpose: link networked elements to local data
//-----------------------------------------------------------------------------

C_NPC_Surface::C_NPC_Surface()