From f4ff0e574cd1c9e87f02f18d1a68ab1a2c611f67 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 5 Apr 2015 10:06:30 -0400 Subject: [PATCH] Fix CoreConfig init to happen after SMGlobalClasses from logic bin are added. This fixes OnSourceModConfigChanged not being called for logic classes when config is first read, matching behavior for core classes. The function is still called before each class's OnSourceModStartup func. --- core/sourcemod.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/sourcemod.cpp b/core/sourcemod.cpp index 5d68eb1d..e8a1dc8d 100644 --- a/core/sourcemod.cpp +++ b/core/sourcemod.cpp @@ -176,9 +176,6 @@ bool SourceModBase::InitializeSourceMod(char *error, size_t maxlength, bool late return false; } - /* Initialize CoreConfig to get the SourceMod base path properly - this parses core.cfg */ - g_CoreConfig.Initialize(); - /* There will always be a path by this point, since it was force-set above. */ m_GotBasePath = true; @@ -276,6 +273,9 @@ void SourceModBase::StartSourceMod(bool late) InitLogicBridge(); + /* Initialize CoreConfig to get the SourceMod base path properly - this parses core.cfg */ + g_CoreConfig.Initialize(); + /* Notify! */ SMGlobalClass *pBase = SMGlobalClass::head; while (pBase)