1.1 --- a/sourcemm/sourcemm.cpp Fri Oct 21 20:50:01 2005 +0000
1.2 +++ b/sourcemm/sourcemm.cpp Sat Oct 22 05:05:35 2005 +0000
1.3 @@ -30,6 +30,7 @@
1.4 SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, false);
1.5 SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool);
1.6 bool DLLInit(CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory, CreateInterfaceFn filesystemFactory, CGlobalVars *pGlobals);
1.7 +bool DLLInit_Post(CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory, CreateInterfaceFn filesystemFactory, CGlobalVars *pGlobals);
1.8 void DLLShutdown_handler();
1.9 void LevelShutdown_handler();
1.10 bool LevelInit_handler(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background);
1.11 @@ -99,6 +100,7 @@
1.12 bInFirstLevel = true;
1.13
1.14 SH_ADD_HOOK_STATICFUNC(IServerGameDLL, DLLInit, g_GameDll.pGameDLL, DLLInit, false);
1.15 + SH_ADD_HOOK_STATICFUNC(IServerGameDLL, DLLInit, g_GameDll.pGameDLL, DLLInit_Post, true);
1.16 SH_ADD_HOOK_STATICFUNC(IServerGameDLL, DLLShutdown, g_GameDll.pGameDLL, DLLShutdown_handler, false);
1.17 SH_ADD_HOOK_STATICFUNC(IServerGameDLL, LevelShutdown, g_GameDll.pGameDLL, LevelShutdown_handler, true);
1.18 SH_ADD_HOOK_STATICFUNC(IServerGameDLL, LevelInit, g_GameDll.pGameDLL, LevelInit_handler, true);
1.19 @@ -140,8 +142,6 @@
1.20
1.21 LoadPluginsFromFile(full_path);
1.22
1.23 - g_PluginMngr.SetAllLoaded();
1.24 -
1.25 bInFirstLevel = true;
1.26
1.27 dllExec = SH_GET_CALLCLASS(g_GameDll.pGameDLL);
1.28 @@ -149,6 +149,12 @@
1.29 RETURN_META_VALUE(MRES_IGNORED, true);
1.30 }
1.31
1.32 +bool DLLInit_Post(CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory, CreateInterfaceFn filesystemFactory, CGlobalVars *pGlobals)
1.33 +{
1.34 + g_PluginMngr.SetAllLoaded();
1.35 + RETURN_META_VALUE(MRES_IGNORED, true);
1.36 +}
1.37 +
1.38 //This is where the magic happens
1.39 SMM_API void *CreateInterface(const char *iface, int *ret)
1.40 {