diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-07-25 07:25:27 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-07-25 07:25:27 +1000 |
commit | 323364f0af7cb8e9660aa3c2fedd4b91d427ba5c (patch) | |
tree | 0f53b84ad4776b76f0065bc19960758a1fb349b4 | |
parent | 0638127721a2c5327be65824266f3bb677a89f20 (diff) |
well that doesn't compile outside MSVC apparently
-rw-r--r-- | source/game/StarObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/StarObject.cpp b/source/game/StarObject.cpp index 753dafc..ece0b20 100644 --- a/source/game/StarObject.cpp +++ b/source/game/StarObject.cpp @@ -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()); |