mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-14 15:57:59 +03:00
Fix compilation without MAPBASE_RPC
This commit is contained in:
parent
eca6fd8864
commit
ae1162d907
@ -83,8 +83,6 @@ static const char *g_pszRPCNames[] = {
|
|||||||
// There can be only one...for each RPC.
|
// There can be only one...for each RPC.
|
||||||
static EHANDLE g_Metadata[NUM_RPCS];
|
static EHANDLE g_Metadata[NUM_RPCS];
|
||||||
|
|
||||||
#define CMapbaseMetadata C_MapbaseMetadata
|
|
||||||
|
|
||||||
// Don't update constantly
|
// Don't update constantly
|
||||||
#define RPC_UPDATE_COOLDOWN 5.0f
|
#define RPC_UPDATE_COOLDOWN 5.0f
|
||||||
|
|
||||||
@ -92,6 +90,10 @@ static EHANDLE g_Metadata[NUM_RPCS];
|
|||||||
#define RPC_UPDATE_WAIT 0.25f
|
#define RPC_UPDATE_WAIT 0.25f
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CLIENT_DLL
|
||||||
|
#define CMapbaseMetadata C_MapbaseMetadata
|
||||||
|
#endif
|
||||||
|
|
||||||
class CMapbaseMetadata : public CBaseEntity
|
class CMapbaseMetadata : public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -101,6 +103,7 @@ public:
|
|||||||
DECLARE_NETWORKCLASS();
|
DECLARE_NETWORKCLASS();
|
||||||
DECLARE_CLASS( CMapbaseMetadata, CBaseEntity );
|
DECLARE_CLASS( CMapbaseMetadata, CBaseEntity );
|
||||||
|
|
||||||
|
#ifdef MAPBASE_RPC
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
~C_MapbaseMetadata()
|
~C_MapbaseMetadata()
|
||||||
{
|
{
|
||||||
@ -174,15 +177,18 @@ public:
|
|||||||
return SetTransmitState( FL_EDICT_ALWAYS );
|
return SetTransmitState( FL_EDICT_ALWAYS );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
// Built-in update spam limiter
|
|
||||||
float m_flRPCUpdateTimer = RPC_UPDATE_COOLDOWN;
|
|
||||||
|
|
||||||
char m_iszRPCState[128];
|
char m_iszRPCState[128];
|
||||||
char m_iszRPCDetails[128];
|
char m_iszRPCDetails[128];
|
||||||
|
|
||||||
|
#ifdef MAPBASE_RPC
|
||||||
|
// Built-in update spam limiter
|
||||||
|
float m_flRPCUpdateTimer = RPC_UPDATE_COOLDOWN;
|
||||||
|
|
||||||
int m_spawnflags;
|
int m_spawnflags;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
CNetworkVar( string_t, m_iszRPCState );
|
CNetworkVar( string_t, m_iszRPCState );
|
||||||
CNetworkVar( string_t, m_iszRPCDetails );
|
CNetworkVar( string_t, m_iszRPCDetails );
|
||||||
@ -198,6 +204,7 @@ IMPLEMENT_NETWORKCLASS_ALIASED(MapbaseMetadata, DT_MapbaseMetadata)
|
|||||||
|
|
||||||
BEGIN_NETWORK_TABLE_NOBASE(CMapbaseMetadata, DT_MapbaseMetadata)
|
BEGIN_NETWORK_TABLE_NOBASE(CMapbaseMetadata, DT_MapbaseMetadata)
|
||||||
|
|
||||||
|
#ifdef MAPBASE_RPC
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
RecvPropString(RECVINFO(m_iszRPCState)),
|
RecvPropString(RECVINFO(m_iszRPCState)),
|
||||||
RecvPropString(RECVINFO(m_iszRPCDetails)),
|
RecvPropString(RECVINFO(m_iszRPCDetails)),
|
||||||
@ -207,6 +214,7 @@ BEGIN_NETWORK_TABLE_NOBASE(CMapbaseMetadata, DT_MapbaseMetadata)
|
|||||||
SendPropStringT(SENDINFO(m_iszRPCDetails) ),
|
SendPropStringT(SENDINFO(m_iszRPCDetails) ),
|
||||||
SendPropInt( SENDINFO(m_spawnflags), 8, SPROP_UNSIGNED ),
|
SendPropInt( SENDINFO(m_spawnflags), 8, SPROP_UNSIGNED ),
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
END_NETWORK_TABLE()
|
END_NETWORK_TABLE()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user