diff -r 7b81c8f8ee1f -r 5293725a71fe sourcemm/sourcemm.cpp --- a/sourcemm/sourcemm.cpp Fri Oct 21 20:50:01 2005 +0000 +++ b/sourcemm/sourcemm.cpp Sat Oct 22 05:05:35 2005 +0000 @@ -30,6 +30,7 @@ SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, false); SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool); bool DLLInit(CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory, CreateInterfaceFn filesystemFactory, CGlobalVars *pGlobals); +bool DLLInit_Post(CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory, CreateInterfaceFn filesystemFactory, CGlobalVars *pGlobals); void DLLShutdown_handler(); void LevelShutdown_handler(); bool LevelInit_handler(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background); @@ -99,6 +100,7 @@ bInFirstLevel = true; SH_ADD_HOOK_STATICFUNC(IServerGameDLL, DLLInit, g_GameDll.pGameDLL, DLLInit, false); + SH_ADD_HOOK_STATICFUNC(IServerGameDLL, DLLInit, g_GameDll.pGameDLL, DLLInit_Post, true); SH_ADD_HOOK_STATICFUNC(IServerGameDLL, DLLShutdown, g_GameDll.pGameDLL, DLLShutdown_handler, false); SH_ADD_HOOK_STATICFUNC(IServerGameDLL, LevelShutdown, g_GameDll.pGameDLL, LevelShutdown_handler, true); SH_ADD_HOOK_STATICFUNC(IServerGameDLL, LevelInit, g_GameDll.pGameDLL, LevelInit_handler, true); @@ -140,8 +142,6 @@ LoadPluginsFromFile(full_path); - g_PluginMngr.SetAllLoaded(); - bInFirstLevel = true; dllExec = SH_GET_CALLCLASS(g_GameDll.pGameDLL); @@ -149,6 +149,12 @@ RETURN_META_VALUE(MRES_IGNORED, true); } +bool DLLInit_Post(CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory, CreateInterfaceFn filesystemFactory, CGlobalVars *pGlobals) +{ + g_PluginMngr.SetAllLoaded(); + RETURN_META_VALUE(MRES_IGNORED, true); +} + //This is where the magic happens SMM_API void *CreateInterface(const char *iface, int *ret) {