Update ISource2GameClients::ProcessUsercmds method (#304)

This commit is contained in:
Vladimir 2025-03-12 02:20:15 +03:00 committed by GitHub
parent 9fff41ea32
commit f31e5fbbfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 25 additions and 5 deletions

View File

@ -94,6 +94,9 @@ class IHLTVServer;
class CCompressedResourceManifest;
class ILoadingSpawnGroup;
class IToolGameSimulationAPI;
class CCLCMsg_Move;
template <typename T>
class CNetMessagePB;
namespace google
{
@ -601,7 +604,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<CCLCMsg_Move> &msg, bool paused ) = 0;
virtual bool IsPlayerSlotOccupied( CPlayerSlot slot ) = 0;

View File

@ -17,13 +17,22 @@
#include <engine/IEngineService.h>
#include <netadr.h>
enum server_state_t : int
{
SS_Dead = 0,
SS_WaitingForGameSessionManifest,
SS_Loading,
SS_Active,
SS_Paused,
};
class IGameSpawnGroupMgr;
struct EventServerAdvanceTick_t;
struct EventServerPollNetworking_t;
struct EventServerProcessNetworking_t;
struct EventServerSimulate_t;
struct EventServerPostSimulate_t;
struct server_state_t;
struct SpawnGroupDesc_t;
class IPrerequisite;
class CServerChangelevelState;
class ISource2WorldSession;
@ -98,7 +107,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;

View File

@ -39,9 +39,15 @@ public:
{
return static_cast<CNetMessagePB<T> *>(this);
}
float GetMargin() const
{
return m_flMargin;
}
private:
char unk001[32];
char unk001[24];
float m_flMargin;
};
// AMNOTE: This is a stub class over real CNetMessagePB!