Ejemplo n.º 1
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.º 2
0
	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 C_SceneEntity::OnResetClientTime()
Ejemplo n.º 3
0
	float			m_flRadius;

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
//-----------------------------------------------------------------------------