Ejemplo n.º 1
0
//-----------------------------------------------------------------------------
// Purpose: 
// Input  : *pVarName - 
//			sizeofVar - 
// Output : RecvProp
//-----------------------------------------------------------------------------
RecvProp RecvPropTime(
	char *pVarName, 
	int offset, 
	int sizeofVar/*=SIZEOF_IGNORE*/ )
{
//	return RecvPropInt( pVarName, offset, sizeofVar, 0, RecvProxy_Time );
	return RecvPropFloat( pVarName, offset, sizeofVar );
};
Ejemplo n.º 2
0
DataTableProp PropAngle(
	const char *pVarName,
	int offset,
	int sizeofVar,
	int nBits,
	int flags
	)
{
#if !defined (CLIENT_DLL)
	return SendPropAngle( pVarName, offset, sizeofVar, nBits, flags );
#else
	return RecvPropFloat( pVarName, offset, sizeofVar, flags );
#endif
}
Ejemplo n.º 3
0
// Use these functions to setup your data tables.
DataTableProp PropFloat(
	const char *pVarName,					// Variable name.
	int offset,						// Offset into container structure.
	int sizeofVar,
	int nBits,					// Number of bits 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 SendPropFloat( pVarName, offset, sizeofVar, nBits, flags, fLowValue, fHighValue );
#else
	return RecvPropFloat( pVarName, offset, sizeofVar, flags );
#endif
}
Ejemplo n.º 4
0
	RecvProxy_StringToString( pData, pStruct, pOut );
}

BEGIN_RECV_TABLE_NOBASE( CTestStruct, DT_TestStruct )
	RecvPropInt( RECVINFO( a ) ),
	RecvPropInt( RECVINFO( b ) ),
	RecvPropFloat( RECVINFO( f ) ),
END_RECV_TABLE()

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()
Ejemplo n.º 5
0
//
// Purpose: stores map postprocess params
//
//=============================================================================
#include "cbase.h"
#include "C_PostProcessController.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

#ifdef CPostProcessController
#undef CPostProcessController
#endif

IMPLEMENT_CLIENTCLASS_DT( C_PostProcessController, DT_PostProcessController, CPostProcessController )
	RecvPropArray3( RECVINFO_NAME( m_PostProcessParameters.m_flParameters[0], m_flPostProcessParameters ), POST_PROCESS_PARAMETER_COUNT, RecvPropFloat( RECVINFO_NAME( m_PostProcessParameters.m_flParameters[0], m_flPostProcessParameters[0] ) ) ),
	RecvPropBool( RECVINFO(m_bMaster) )
END_RECV_TABLE()

C_PostProcessController* C_PostProcessController::ms_pMasterController = NULL;

//-----------------------------------------------------------------------------
C_PostProcessController::C_PostProcessController( void )
: 	m_bMaster( false )
{
	if ( ms_pMasterController == NULL )
	{
		ms_pMasterController = this;
	}
}
Ejemplo n.º 6
0
//-----------------------------------------------------------------------------
// 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()
{
	m_pMaterial = NULL;

	m_vecSurfacePos.EnsureCount( MAX_SURFACE_ELEMENTS );