diff --git a/public/eiface.h b/public/eiface.h index d77e089b..84f36c7e 100644 --- a/public/eiface.h +++ b/public/eiface.h @@ -600,7 +600,9 @@ public: virtual void ClientSetupVisibility( CPlayerSlot slot, vis_info_t *visinfo ) = 0; // A block of CUserCmds has arrived from the user, decode them and buffer for execution during player simulation - virtual int ProcessUsercmds( CPlayerSlot slot, bf_read *buf, int numcmds, bool ignore, bool paused, float margin ) = 0; + // Will be called when CNetworkGameServerBase::GetServerState() > SS_Loading + // A "paused" argument equals CNetworkGameServerBase::GetServerState() == SS_Paused + virtual void ProcessUsercmds( CPlayerSlot slot, const CNetMessagePB &msg, bool paused ) = 0; virtual bool IsPlayerSlotOccupied( CPlayerSlot slot ) = 0; diff --git a/public/iserver.h b/public/iserver.h index c272f592..6a786b52 100644 --- a/public/iserver.h +++ b/public/iserver.h @@ -18,6 +18,15 @@ #include "icvar.h" #include +enum server_state_t : int +{ + SS_Dead = 0, + SS_WaitingForGameSessionManifest, + SS_Loading, + SS_Active, + SS_Paused, +}; + class IGameSpawnGroupMgr; struct EventServerAdvanceTick_t; struct EventServerPollNetworking_t; @@ -25,7 +34,7 @@ struct EventServerProcessNetworking_t; struct EventServerSimulate_t; struct EventServerEndSimulate_t; struct EventServerPostSimulate_t; -struct server_state_t; +struct SpawnGroupDesc_t; class IPrerequisite; class CServerChangelevelState; class ISource2WorldSession; @@ -110,7 +119,7 @@ public: virtual void MakeSpawnGroupActive( SpawnGroupHandle_t ) = 0; virtual void SynchronouslySpawnGroup( SpawnGroupHandle_t ) = 0; - virtual void SetServerState( server_state_t ) = 0; + virtual void SetServerState( server_state_t eNewState ) = 0; virtual void SpawnServer( const char * ) = 0; virtual int GetSpawnGroupLoadingStatus( SpawnGroupHandle_t ) = 0; diff --git a/public/networksystem/netmessage.h b/public/networksystem/netmessage.h index be2cbcce..8aab671b 100644 --- a/public/networksystem/netmessage.h +++ b/public/networksystem/netmessage.h @@ -39,7 +39,12 @@ public: { return static_cast *>(this); } - + + float GetMargin() const + { + return m_flMargin; + } + private: char unk001[24]; float m_flMargin;