We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6ac0880 + f92b504 commit 690f95fCopy full SHA for 690f95f
components/lua/scriptscontainer.cpp
@@ -92,13 +92,16 @@ namespace LuaUtil
92
if (hasScript(scriptId))
93
return false; // already present
94
95
+ LoadedData& data = ensureLoaded();
96
+ if (data.mScripts.count(scriptId) != 0)
97
+ return false; // bail if the script we're adding was auto started
98
+
99
const VFS::Path::Normalized& path = scriptPath(scriptId);
100
std::string debugName = mNamePrefix;
101
debugName.push_back('[');
102
debugName.append(path);
103
debugName.push_back(']');
104
- LoadedData& data = ensureLoaded();
105
Script& script = data.mScripts[scriptId];
106
script.mHiddenData = view.newTable();
107
script.mHiddenData[sScriptIdKey] = ScriptId{ this, scriptId };
0 commit comments