1.1 --- a/core/ConVarManager.h Thu Feb 27 20:22:01 2014 -0500
1.2 +++ b/core/ConVarManager.h Thu Feb 27 19:55:13 2014 -0700
1.3 @@ -39,8 +39,10 @@
1.4 #include <IForwardSys.h>
1.5 #include <IHandleSys.h>
1.6 #include <IRootConsoleMenu.h>
1.7 +#include <IPlayerHelpers.h>
1.8 #include <compat_wrappers.h>
1.9 #include "concmd_cleaner.h"
1.10 +#include "PlayerManager.h"
1.11
1.12 #if SOURCE_ENGINE == SE_DARKMESSIAH
1.13 class EQueryCvarValueStatus;
1.14 @@ -80,6 +82,7 @@
1.15 QueryCvarCookie_t cookie; /**< Cookie that identifies query */
1.16 IPluginFunction *pCallback; /**< Function that will be called when query is finished */
1.17 cell_t value; /**< Optional value passed to query function */
1.18 + cell_t client; /**< Only used for cleaning up on client disconnection */
1.19 };
1.20
1.21 class ConVarManager :
1.22 @@ -87,7 +90,8 @@
1.23 public IHandleTypeDispatch,
1.24 public IPluginsListener,
1.25 public IRootConsoleCommand,
1.26 - public IConCommandTracker
1.27 + public IConCommandTracker,
1.28 + public IClientListener
1.29 {
1.30 public:
1.31 ConVarManager();
1.32 @@ -106,6 +110,8 @@
1.33 void OnRootConsoleCommand(const char *cmdname, const CCommand &command);
1.34 public: //IConCommandTracker
1.35 void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe);
1.36 +public: //IClientListener
1.37 + void OnClientDisconnected(int client);
1.38 public:
1.39 /**
1.40 * Create a convar and return a handle to it.