1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-20 13:54:14 +01:00

Fix temporary meta_level_init, etc. commands not working.

This commit is contained in:
Nicholas Hastings 2015-07-10 09:30:28 -04:00
parent 95f2033341
commit 36cb59aada
2 changed files with 16 additions and 1 deletions

View File

@ -502,8 +502,11 @@ Handler_GameInit()
}
is_game_init = true;
#if SOURCE_ENGINE == SE_SOURCE2
return true;
#else
RETURN_META_VALUE(MRES_IGNORED, true);
#endif
}
void
@ -551,7 +554,10 @@ Handler_LevelShutdown(void)
ITER_EVENT(OnLevelShutdown, ());
#if SOURCE_ENGINE == SE_SOURCE2
#else
RETURN_META(MRES_IGNORED);
#endif
}
static bool
@ -564,7 +570,11 @@ Handler_LevelInit(char const *pMapName,
{
ITER_EVENT(OnLevelInit, (pMapName, pMapEntities, pOldLevel, pLandmarkName, loadGame, background));
#if SOURCE_ENGINE == SE_SOURCE2
return false;
#else
RETURN_META_VALUE(MRES_IGNORED, false);
#endif
}
void MetamodSource::LogMsg(ISmmPlugin *pl, const char *msg, ...)

View File

@ -168,6 +168,11 @@ void BaseProvider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory,
#endif
g_SMConVarAccessor.RegisterConCommandBase(&meta_local_cmd);
#if SOURCE_ENGINE == SE_SOURCE2
g_SMConVarAccessor.RegisterConCommandBase(&_meta_game_init);
g_SMConVarAccessor.RegisterConCommandBase(&_meta_level_init);
g_SMConVarAccessor.RegisterConCommandBase(&_meta_level_shutdown);
#endif
CacheUserMessages();