From 6506bc20cb4084e4d775f59014e2d05dab3cac7e Mon Sep 17 00:00:00 2001 From: trompetin17 Date: Wed, 3 Jun 2015 20:34:59 +0000 Subject: [PATCH] Fixes #3238, SetGlobal 'TriggerHelper' called multiple times This was SVN commit r16713. --- source/simulation2/Simulation2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/simulation2/Simulation2.cpp b/source/simulation2/Simulation2.cpp index f683fc5a20..ac061d1dda 100644 --- a/source/simulation2/Simulation2.cpp +++ b/source/simulation2/Simulation2.cpp @@ -210,7 +210,11 @@ bool CSimulation2Impl::LoadTriggerScripts(CComponentManager& componentManager, J { std::string scriptName = "maps/" + scriptNames[i]; if (loadedScripts) + { + if (loadedScripts->find(scriptName) != loadedScripts->end()) + return true; loadedScripts->insert(scriptName); + } LOGMESSAGE("Loading trigger script '%s'", scriptName.c_str()); if (!componentManager.LoadScript(scriptName.data())) ok = false;