Skip to content

Commit

Permalink
Fix IMetamodListener events in s2_sample_mm
Browse files Browse the repository at this point in the history
  • Loading branch information
GAMMACASE authored and psychonic committed Oct 30, 2023
1 parent e67e2a9 commit 6ee74f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions samples/s2_sample_mm/sample_mm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
// gpGlobals = ismm->GetCGlobals();

// Required to get the IMetamodListener events
g_SMAPI->AddListener( this, this );

META_CONPRINTF( "Starting plugin.\n" );

SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, server, this, &SamplePlugin::Hook_GameFrame, true);
Expand Down Expand Up @@ -157,7 +160,6 @@ void SamplePlugin::Hook_GameFrame( bool simulating, bool bFirstTick, bool bLastT
*/
}

// Potentially might not work
void SamplePlugin::OnLevelInit( char const *pMapName,
char const *pMapEntities,
char const *pOldLevel,
Expand All @@ -168,7 +170,6 @@ void SamplePlugin::OnLevelInit( char const *pMapName,
META_CONPRINTF("OnLevelInit(%s)\n", pMapName);
}

// Potentially might not work
void SamplePlugin::OnLevelShutdown()
{
META_CONPRINTF("OnLevelShutdown()\n");
Expand Down

0 comments on commit 6ee74f0

Please sign in to comment.