well that doesn't compile outside MSVC apparently

This commit is contained in:
Kae 2024-07-25 07:25:27 +10:00
parent 0638127721
commit 323364f0af

View File

@ -189,10 +189,10 @@ void Object::init(World* world, EntityId entityId, EntityMode mode) {
setKeepAlive(configValue("keepAlive", false).toBool());
auto jScripts = configValue("scripts", JsonArray());
StringList scripts = jScripts.isType(Json::Type::Array)
? jsonToStringList(jScripts).transformed(bind(AssetPath::relativeTo, m_config->path, _1))
: m_config->scripts;
m_scriptComponent.setScripts(scripts);
if (jScripts.isType(Json::Type::Array))
m_scriptComponent.setScripts(jsonToStringList(jScripts).transformed(bind(AssetPath::relativeTo, m_config->path, _1)));
else
m_scriptComponent.setScripts(m_config->scripts);
m_scriptComponent.setUpdateDelta(configValue("scriptDelta", 5).toInt());
m_scriptComponent.addCallbacks("object", makeObjectCallbacks());