diff --git a/src/game/server/gameinterface.cpp b/src/game/server/gameinterface.cpp index 14d31b79..9a017b3e 100644 --- a/src/game/server/gameinterface.cpp +++ b/src/game/server/gameinterface.cpp @@ -154,7 +154,7 @@ void DrawServerHitboxes(bool bRunOverlays) } } -void CServerGameClients::ProcessUserCmds(CServerGameClients* thisp, edict_t edict, +void CServerGameClients::_ProcessUserCmds(CServerGameClients* thisp, edict_t edict, bf_read* buf, int numCmds, int totalCmds, int droppedPackets, bool ignore, bool paused) { int i; @@ -209,7 +209,7 @@ void VServerGameDLL::Detour(const bool bAttach) const { DetourSetup(&CServerGameDLL__DLLInit, &CServerGameDLL::DLLInit, bAttach); DetourSetup(&CServerGameDLL__OnReceivedSayTextMessage, &CServerGameDLL::OnReceivedSayTextMessage, bAttach); - DetourSetup(&CServerGameClients__ProcessUserCmds, CServerGameClients::ProcessUserCmds, bAttach); + DetourSetup(&CServerGameClients__ProcessUserCmds, CServerGameClients::_ProcessUserCmds, bAttach); DetourSetup(&v_RunFrameServer, &RunFrameServer, bAttach); } diff --git a/src/game/server/gameinterface.h b/src/game/server/gameinterface.h index 791eeed5..048e1e64 100644 --- a/src/game/server/gameinterface.h +++ b/src/game/server/gameinterface.h @@ -38,7 +38,7 @@ public: // Hook statics class CServerGameClients : public IServerGameClients { public: - static void ProcessUserCmds(CServerGameClients* thisp, edict_t edict, bf_read* buf, + static void _ProcessUserCmds(CServerGameClients* thisp, edict_t edict, bf_read* buf, int numCmds, int totalCmds, int droppedPackets, bool ignore, bool paused); private: }; diff --git a/src/public/eiface.h b/src/public/eiface.h index 7076ca35..59d3299d 100644 --- a/src/public/eiface.h +++ b/src/public/eiface.h @@ -8,6 +8,7 @@ #ifndef EIFACE_H #define EIFACE_H #include "edict.h" +#include "tier1/cmd.h" #include "tier1/bitbuf.h" #include "tier1/keyvalues.h" @@ -31,8 +32,29 @@ public: // Client is going active // If bLoadGame is true, don't spawn the player because its state is already setup. - virtual void ClientActive(edict_t nEntity, bool bLoadGame) = 0; - virtual void ClientFullyConnect(edict_t nEntity, bool bRestore) = 0; + virtual void ClientActive(edict_t nEntity, bool bLoadGame) = 0; + + virtual void ClientFullyConnect(edict_t nEntity, bool bRestore) = 0; + + // Client is disconnecting from server + virtual void ClientDisconnect(edict_t nEntity, void* unk) = 0; + + // Client is connected and should be put in the game + virtual void ClientPutInServer(edict_t nEntity, const char* playername) = 0; + + // The client has typed a command at the console + virtual void ClientCommand(edict_t nEntity, const CCommand& args) = 0; + + // A player changed one/several replicated cvars (name etc) + virtual void ClientSettingsChanged(edict_t nEntity) = 0; + + // A block of CUserCmds has arrived from the user, decode them and buffer for execution during player simulation + virtual void ProcessUsercmds(edict_t nEntity, bf_read* buf, int numCmds, int totalCmds, int droppedPackets, bool ignore, bool paused) = 0; + + virtual void* sub_140D5F910(edict_t nEntity) = 0; + + // The client has submitted a keyvalues command + virtual void ClientCommandKeyValues(edict_t nEntity, KeyValues* pKeyValues) = 0; }; #define INTERFACEVERSION_SERVERGAMECLIENTS_NEW "ServerGameClients004"