Fixed amb660 - crash on exit when handles were created for convars that belonged to Metamod:Source plugins (or SM extensions that were loaded as MM:S plugins)
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401151
This commit is contained in:
@@ -35,6 +35,9 @@ struct ConVarInfo
|
||||
bool sourceMod; /**< Determines whether or not convar was created by a SourceMod plugin */
|
||||
IChangeableForward *pChangeForward; /**< Forward associated with convar */
|
||||
FnChangeCallback origCallback; /**< The original callback function */
|
||||
#if PLAPI_VERSION < 12
|
||||
const char *name; /**< Name of convar */
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -109,6 +112,18 @@ public:
|
||||
*/
|
||||
QueryCvarCookie_t QueryClientConVar(edict_t *pPlayer, const char *name, IPluginFunction *pCallback,
|
||||
Handle_t hndl);
|
||||
|
||||
#if PLAPI_VERSION >= 12
|
||||
/**
|
||||
* Called when Metamod:Source is about to remove convar
|
||||
*/
|
||||
void OnUnlinkConCommandBase(PluginId id, ConCommandBase *pCommand);
|
||||
#else
|
||||
/**
|
||||
* Called when Metamod:Source has unloaded a plugin
|
||||
*/
|
||||
void OnMetamodPluginUnloaded(PluginId id);
|
||||
#endif
|
||||
private:
|
||||
/**
|
||||
* Adds a convar to a plugin's list.
|
||||
@@ -132,6 +147,9 @@ private:
|
||||
Trie *m_ConVarCache;
|
||||
IServerPluginCallbacks *m_VSPIface;
|
||||
bool m_CanQueryConVars;
|
||||
#if PLAPI_VERSION < 12
|
||||
bool m_IgnoreHandle;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern ConVarManager g_ConVarManager;
|
||||
|
||||
Reference in New Issue
Block a user