SourceMM::IMetamodListener Class Reference

Various events that Metamod can fire.

#include <ISmmPlugin.h>

List of all members.

Public Member Functions

virtual void OnPluginLoad (PluginId id)
 Called when a plugin is loaded.
virtual void OnPluginUnload (PluginId id)
 Called when a plugin is unloaded.
virtual void OnPluginPause (PluginId id)
 Called when a plugin is paused.
virtual void OnPluginUnpause (PluginId id)
 Called when a plugin is unpaused.
virtual void OnLevelInit (char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background)
 Called when the level is loaded (after GameInit, before ServerActivate).
virtual void OnLevelShutdown ()
 Called when the level is shut down. May be called more than once.
virtual void * OnEngineQuery (const char *iface, int *ret)
 Called when engineFactory() is used through Metamod:Source's wrapper. This can be used to provide interfaces to other plugins or the GameDLL.
virtual void * OnPhysicsQuery (const char *iface, int *ret)
 Called when the physics factory is used through Metamod:Source's wrapper. This can be used to provide interfaces to other plugins.
virtual void * OnFileSystemQuery (const char *iface, int *ret)
 Called when the filesystem factory is used through Metamod:Source's wrapper. This can be used to provide interfaces to other plugins.
virtual void * OnGameDLLQuery (const char *iface, int *ret)
 Called when the server DLL's factory is used through Metamod:Source's wrapper. This can be used to provide interfaces to other plugins.
virtual void * OnMetamodQuery (const char *iface, int *ret)
 Called when Metamod's own factory is invoked. This can be used to provide interfaces to other plugins.
virtual void OnVSPListening (IServerPluginCallbacks *iface)
 Called when Metamod:Source acquires a valid IServerPluginCallbacks pointer to be used for hooking by plugins.
virtual void OnUnlinkConCommandBase (PluginId id, ConCommandBase *pCommand)
 Called when Metamod:Source is about to remove a concommand or convar. This can also be called if ISmmAPI::UnregisterConCmdBase is used by a plugin.


Detailed Description

Definition at line 196 of file ISmmPlugin.h.


Member Function Documentation

virtual void SourceMM::IMetamodListener::OnPluginLoad ( PluginId  id  )  [inline, virtual]

Parameters:
id Id of the plugin.

Definition at line 204 of file ISmmPlugin.h.

virtual void SourceMM::IMetamodListener::OnPluginUnload ( PluginId  id  )  [inline, virtual]

Parameters:
id Id of the plugin.

Definition at line 213 of file ISmmPlugin.h.

virtual void SourceMM::IMetamodListener::OnPluginPause ( PluginId  id  )  [inline, virtual]

Parameters:
id Id of the plugin.

Definition at line 222 of file ISmmPlugin.h.

virtual void SourceMM::IMetamodListener::OnPluginUnpause ( PluginId  id  )  [inline, virtual]

Parameters:
id Id of the plugin.

Definition at line 231 of file ISmmPlugin.h.

virtual void SourceMM::IMetamodListener::OnLevelInit ( char const *  pMapName,
char const *  pMapEntities,
char const *  pOldLevel,
char const *  pLandmarkName,
bool  loadGame,
bool  background 
) [inline, virtual]

To override this, hook IServerGameDLL::LevelInit().

Parameters:
pMapName Name of the map.
pMapEntities Lump string of the map entities, in KeyValues format.
pOldLevel Unknown.
pLandmarkName Unknown.
loadGame Unknown.
background Unknown.

Definition at line 249 of file ISmmPlugin.h.

virtual void* SourceMM::IMetamodListener::OnEngineQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 278 of file ISmmPlugin.h.

virtual void* SourceMM::IMetamodListener::OnPhysicsQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 300 of file ISmmPlugin.h.

virtual void* SourceMM::IMetamodListener::OnFileSystemQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 322 of file ISmmPlugin.h.

virtual void* SourceMM::IMetamodListener::OnGameDLLQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 344 of file ISmmPlugin.h.

virtual void* SourceMM::IMetamodListener::OnMetamodQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 365 of file ISmmPlugin.h.

virtual void SourceMM::IMetamodListener::OnVSPListening ( IServerPluginCallbacks *  iface  )  [inline, virtual]

This will only be called after a call to ISmmAPI::EnableVSPListener(). If called before GameInit, this callback will occur before LevelInit. Otherwise, it will be called on the first call after that.

This callback is provided to all plugins regardless of which (or how many) called EnableVSPListener(), but only if at least one did in fact enable it, and only once for all plugins. That is, a late loading plugin should use ISmmAPI::GetVSPInfo() before relying on this callback.

This callback is never called if Metamod:Source is in VSP mode. If in VSP mode, a VSP instance is automatically and always available via ISmmAPI::GetVSPInfo(), which should be called anyway (to handle late loading cases).

Parameters:
iface Interface pointer. If NULL, then the VSP listening construct failed to initialize and is not available.

Definition at line 398 of file ISmmPlugin.h.

virtual void SourceMM::IMetamodListener::OnUnlinkConCommandBase ( PluginId  id,
ConCommandBase *  pCommand 
) [inline, virtual]

Parameters:
id Id of the plugin that created the concommand or convar.
pCommand Pointer to concommand or convar that is being removed.

Definition at line 412 of file ISmmPlugin.h.


The documentation for this class was generated from the following file:

Generated on Mon Feb 18 18:10:28 2008 for Metamod:Source by  doxygen 1.5.5