mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-06 18:08:31 +00:00
Fix IMetamodListener events in s2_sample_mm
This commit is contained in:
parent
e67e2a9e73
commit
6ee74f047a
@ -70,6 +70,9 @@ bool SamplePlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen,
|
|||||||
// Currently doesn't work from within mm side, use GetGameGlobals() in the mean time instead
|
// Currently doesn't work from within mm side, use GetGameGlobals() in the mean time instead
|
||||||
// gpGlobals = ismm->GetCGlobals();
|
// gpGlobals = ismm->GetCGlobals();
|
||||||
|
|
||||||
|
// Required to get the IMetamodListener events
|
||||||
|
g_SMAPI->AddListener( this, this );
|
||||||
|
|
||||||
META_CONPRINTF( "Starting plugin.\n" );
|
META_CONPRINTF( "Starting plugin.\n" );
|
||||||
|
|
||||||
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, server, this, &SamplePlugin::Hook_GameFrame, true);
|
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, server, this, &SamplePlugin::Hook_GameFrame, true);
|
||||||
@ -157,7 +160,6 @@ void SamplePlugin::Hook_GameFrame( bool simulating, bool bFirstTick, bool bLastT
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Potentially might not work
|
|
||||||
void SamplePlugin::OnLevelInit( char const *pMapName,
|
void SamplePlugin::OnLevelInit( char const *pMapName,
|
||||||
char const *pMapEntities,
|
char const *pMapEntities,
|
||||||
char const *pOldLevel,
|
char const *pOldLevel,
|
||||||
@ -168,7 +170,6 @@ void SamplePlugin::OnLevelInit( char const *pMapName,
|
|||||||
META_CONPRINTF("OnLevelInit(%s)\n", pMapName);
|
META_CONPRINTF("OnLevelInit(%s)\n", pMapName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Potentially might not work
|
|
||||||
void SamplePlugin::OnLevelShutdown()
|
void SamplePlugin::OnLevelShutdown()
|
||||||
{
|
{
|
||||||
META_CONPRINTF("OnLevelShutdown()\n");
|
META_CONPRINTF("OnLevelShutdown()\n");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user