From 7a1675468c1ee03c777cde874fc4d5fb230e0dfa Mon Sep 17 00:00:00 2001 From: "zer0.k" <61156310+zer0k-z@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:03:08 +0700 Subject: [PATCH] Update INetworkGameServer & add CNetworkGameServerBase (#257) --- public/iserver.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/public/iserver.h b/public/iserver.h index 4a42c909..6c67cc13 100644 --- a/public/iserver.h +++ b/public/iserver.h @@ -127,9 +127,18 @@ public: virtual void unk201() = 0; virtual void unk202() = 0; +}; + +abstract_class CNetworkGameServerBase : public INetworkGameServer, protected IConnectionlessPacketHandler +{ +public: + virtual ~CNetworkGameServerBase() = 0; + virtual void SetMaxClients( int nMaxClients ) = 0; virtual void unk301() = 0; + virtual bool ProcessConnectionlessPacket( const ns_address *addr, bf_read *bf ) = 0; // process a connectionless packet + virtual CPlayerUserId GetPlayerUserId( CPlayerSlot slot ) = 0; virtual const char *GetPlayerNetworkIDString( CPlayerSlot slot ) = 0; @@ -179,7 +188,7 @@ abstract_class INetworkServerService : public IEngineService { public: virtual ~INetworkServerService() {} - virtual INetworkGameServer *GetIGameServer( void ) = 0; + virtual CNetworkGameServerBase *GetIGameServer( void ) = 0; virtual bool IsActiveInGame( void ) const = 0; virtual bool IsMultiplayer( void ) const = 0; virtual void StartupServer( const GameSessionConfiguration_t &config, ISource2WorldSession *pWorldSession, const char * ) = 0; @@ -204,7 +213,7 @@ public: virtual void *GetServerSerializersMsg( void ) = 0; }; -typedef INetworkGameServer IServer; +typedef CNetworkGameServerBase IServer; #endif // ISERVER_H