Update names

This commit is contained in:
David Markowitz 2024-05-12 22:53:03 -07:00
parent 6218266a4a
commit 0e4e1def81

View File

@ -330,17 +330,17 @@
namespace { namespace {
// This is in the translation unit instead of the header to prevent wierd linker errors // This is in the translation unit instead of the header to prevent wierd linker errors
InvalidScript* const InvalidToReturnOld = new InvalidScript(); InvalidScript* const InvalidToReturn = new InvalidScript();
std::map<std::string, CppScripts::Script*> m_ScriptsOld; std::map<std::string, CppScripts::Script*> m_Scripts;
}; };
CppScripts::Script* const CppScriptsOld::GetScript(Entity* parent, const std::string& scriptName) { CppScripts::Script* const CppScriptsOld::GetScript(Entity* parent, const std::string& scriptName) {
auto itr = m_ScriptsOld.find(scriptName); auto itr = m_Scripts.find(scriptName);
if (itr != m_ScriptsOld.end()) { if (itr != m_Scripts.end()) {
return itr->second; return itr->second;
} }
CppScripts::Script* script = InvalidToReturnOld; CppScripts::Script* script = InvalidToReturn;
//VE / AG: //VE / AG:
if (scriptName == "scripts\\ai\\AG\\L_AG_SHIP_PLAYER_DEATH_TRIGGER.lua") if (scriptName == "scripts\\ai\\AG\\L_AG_SHIP_PLAYER_DEATH_TRIGGER.lua")
@ -977,7 +977,7 @@ CppScripts::Script* const CppScriptsOld::GetScript(Entity* parent, const std::st
// handle invalid script reporting if the path is greater than zero and it's not an ignored script // handle invalid script reporting if the path is greater than zero and it's not an ignored script
// information not really needed for sys admins but is for developers // information not really needed for sys admins but is for developers
else if (script == InvalidToReturnOld) { else if (script == InvalidToReturn) {
if ((scriptName.length() > 0) && !((scriptName == "scripts\\02_server\\Enemy\\General\\L_SUSPEND_LUA_AI.lua") || if ((scriptName.length() > 0) && !((scriptName == "scripts\\02_server\\Enemy\\General\\L_SUSPEND_LUA_AI.lua") ||
(scriptName == "scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_SPIDERLING.lua") || (scriptName == "scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_SPIDERLING.lua") ||
(scriptName =="scripts\\ai\\FV\\L_ACT_NINJA_STUDENT.lua") || (scriptName =="scripts\\ai\\FV\\L_ACT_NINJA_STUDENT.lua") ||
@ -986,6 +986,6 @@ CppScripts::Script* const CppScriptsOld::GetScript(Entity* parent, const std::st
)) LOG_DEBUG("LOT %i attempted to load CppScript for '%s', but returned InvalidScript.", parent->GetLOT(), scriptName.c_str()); )) LOG_DEBUG("LOT %i attempted to load CppScript for '%s', but returned InvalidScript.", parent->GetLOT(), scriptName.c_str());
} }
m_ScriptsOld[scriptName] = script; m_Scripts[scriptName] = script;
return script; return script;
} }