From c52d7c912653a1e8529841178e27e5130c7e7ac3 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 3 Apr 2013 12:25:54 -0400 Subject: [PATCH] Fixed AllPluginsLoaded activities happening before SM is loaded (r=dvander`hom). --- core/sourcemod.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/sourcemod.cpp b/core/sourcemod.cpp index deec9ac4e..9872a4d93 100644 --- a/core/sourcemod.cpp +++ b/core/sourcemod.cpp @@ -299,6 +299,12 @@ void SourceModBase::StartSourceMod(bool late) g_SourceMod_Core.OnVSPListening(vsp_interface); } + if (late) + { + /* We missed doing anythin gin this if we late-loaded. Sneak it in now. */ + AllPluginsLoaded(); + } + /* If we want to autoload, do that now */ const char *disabled = GetCoreConfigValue("DisableAutoUpdate"); if (disabled == NULL || strcasecmp(disabled, "yes") != 0) @@ -637,6 +643,11 @@ IVirtualMachine *SourceModBase::GetScriptingVM() void SourceModBase::AllPluginsLoaded() { + if (!g_Loaded) + { + return; + } + SMGlobalClass *base = SMGlobalClass::head; while (base) {