Add A2S_INFO and A2S_PLAYER querycache which also counts nosteam players and sourcetv

fix player_disconnect when player disconnects during mapchange
This commit is contained in:
2019-07-27 20:56:27 +02:00
parent 21a9b80bbd
commit 84e07e975e
5 changed files with 614 additions and 38 deletions

View File

@ -40,14 +40,14 @@
#include "smsdk_ext.h"
#include <igameevents.h>
/**
* @brief Sample implementation of the SDK Extension.
* Note: Uncomment one of the pre-defined virtual functions in order to use it.
*/
class Connect :
public SDKExtension,
public IConCommandBaseAccessor
public IConCommandBaseAccessor,
public IClientListener
{
public:
/**
@ -120,6 +120,12 @@ public:
public: // IConCommandBaseAccessor
virtual bool RegisterConCommandBase(ConCommandBase *pVar);
public: // IClientListener
virtual void OnClientSettingsChanged(int client);
virtual void OnClientPutInServer(int client);
public:
void OnTimer();
};
class ConnectEvents : public IGameEventListener2
@ -128,6 +134,11 @@ public:
virtual void FireGameEvent( IGameEvent *event );
};
extern ConnectEvents g_ConnectEvents;
class ConnectTimer : public ITimedEvent
{
public:
virtual ResultType OnTimer(ITimer *pTimer, void *pData);
virtual void OnTimerEnd(ITimer *pTimer, void *pData);
};
#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_