mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Update CNetworkGameServerBase
This commit is contained in:
@ -53,7 +53,7 @@ typedef void(*FnChangeCallbackGlobal_t)(ConVarRefAbstract* ref, CSplitScreenSlot
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// ConVar & ConCommand creation listener callbacks
|
// ConVar & ConCommand creation listener callbacks
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
class ICVarListenerCallbacks
|
class IConVarListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void OnConVarCreated( ConVarRefAbstract *pNewCvar ) {};
|
virtual void OnConVarCreated( ConVarRefAbstract *pNewCvar ) {};
|
||||||
@ -93,8 +93,8 @@ public:
|
|||||||
virtual void SetMaxSplitScreenSlots( int nSlots ) = 0;
|
virtual void SetMaxSplitScreenSlots( int nSlots ) = 0;
|
||||||
virtual int GetMaxSplitScreenSlots() const = 0;
|
virtual int GetMaxSplitScreenSlots() const = 0;
|
||||||
|
|
||||||
virtual void RegisterCreationListeners( ICVarListenerCallbacks *callbacks ) = 0;
|
virtual void RegisterCreationListeners( IConVarListener *callbacks ) = 0;
|
||||||
virtual void RemoveCreationListeners( ICVarListenerCallbacks *callbacks ) = 0;
|
virtual void RemoveCreationListeners( IConVarListener *callbacks ) = 0;
|
||||||
|
|
||||||
virtual void unk001() = 0;
|
virtual void unk001() = 0;
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ public:
|
|||||||
CUtlLinkedList<CConVarChangeCallbackNode_t, unsigned short, true> m_ConVarChangeCBList;
|
CUtlLinkedList<CConVarChangeCallbackNode_t, unsigned short, true> m_ConVarChangeCBList;
|
||||||
int m_ConVarCount;
|
int m_ConVarCount;
|
||||||
|
|
||||||
CUtlVector<ICVarListenerCallbacks *> m_CvarCreationListeners;
|
CUtlVector<IConVarListener *> m_CvarCreationListeners;
|
||||||
CUtlVector<FnChangeCallbackGlobal_t> m_GlobalChangeCBList;
|
CUtlVector<FnChangeCallbackGlobal_t> m_GlobalChangeCBList;
|
||||||
|
|
||||||
CUtlLinkedList<ConCommandData> m_ConCommandList;
|
CUtlLinkedList<ConCommandData> m_ConCommandList;
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
#include <resourcefile/resourcetype.h>
|
#include <resourcefile/resourcetype.h>
|
||||||
#include <tier1/checksum_crc.h>
|
#include <tier1/checksum_crc.h>
|
||||||
#include <engine/IEngineService.h>
|
#include <engine/IEngineService.h>
|
||||||
|
#include "networksystem/inetworkmessages.h"
|
||||||
|
#include "icvar.h"
|
||||||
#include <netadr.h>
|
#include <netadr.h>
|
||||||
|
|
||||||
class IGameSpawnGroupMgr;
|
class IGameSpawnGroupMgr;
|
||||||
@ -124,27 +126,34 @@ public:
|
|||||||
|
|
||||||
virtual void unk201() = 0;
|
virtual void unk201() = 0;
|
||||||
virtual void unk202() = 0;
|
virtual void unk202() = 0;
|
||||||
|
|
||||||
|
virtual void BroadcastMessage( INetworkMessageInternal *pNetMessage, const CNetMessage *pData, IRecipientFilter *filter ) = 0;
|
||||||
|
virtual bool IsRecordingDemo() = 0;
|
||||||
|
|
||||||
|
virtual void unk301() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
abstract_class CNetworkGameServerBase : public INetworkGameServer, protected IConnectionlessPacketHandler
|
abstract_class CNetworkGameServerBase : public INetworkGameServer, protected IConnectionlessPacketHandler, public IConVarListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~CNetworkGameServerBase() = 0;
|
virtual ~CNetworkGameServerBase() = 0;
|
||||||
|
|
||||||
virtual void SetMaxClients( int nMaxClients ) = 0;
|
virtual void SetMaxClients( int nMaxClients ) = 0;
|
||||||
|
|
||||||
virtual void unk301() = 0;
|
virtual void unk011() = 0;
|
||||||
|
|
||||||
virtual bool ProcessConnectionlessPacket( const ns_address *addr, bf_read *bf ) = 0; // process a connectionless packet
|
virtual bool ProcessConnectionlessPacket( const ns_address *addr, bf_read *bf ) = 0; // process a connectionless packet
|
||||||
|
|
||||||
|
virtual void OnConVarCreated( ConVarRefAbstract *pNewCvar ) = 0;
|
||||||
|
virtual void OnConCommandCreated( ConCommand *pNewCommand ) = 0;
|
||||||
|
|
||||||
virtual CPlayerUserId GetPlayerUserId( CPlayerSlot slot ) = 0;
|
virtual CPlayerUserId GetPlayerUserId( CPlayerSlot slot ) = 0;
|
||||||
virtual const char *GetPlayerNetworkIDString( CPlayerSlot slot ) = 0;
|
virtual const char *GetPlayerNetworkIDString( CPlayerSlot slot ) = 0;
|
||||||
|
|
||||||
// Returns udp port of this server instance
|
// Returns udp port of this server instance
|
||||||
virtual int GetUDPPort() = 0;
|
virtual uint16 GetUDPPort() = 0;
|
||||||
// Returns hostname of this server instance
|
// Returns hostname of this server instance
|
||||||
virtual const char *GetName() = 0;
|
virtual const char *GetHostName() = 0;
|
||||||
|
|
||||||
// AMNOTE: arg names are speculative and might be incorrect!
|
// AMNOTE: arg names are speculative and might be incorrect!
|
||||||
// Sums up across all the connected players.
|
// Sums up across all the connected players.
|
||||||
|
Reference in New Issue
Block a user