diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index 740ebc9d0..e1e1ca828 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -1357,8 +1357,8 @@ std::pair CStateManager::LoadScriptObject(TAreaId aid, ESc } CEntity* ent = nullptr; - const CEntityInfo info(aid, std::move(conns), id); if (loader) { + const CEntityInfo info(aid, std::move(conns), id); ent = loader(*this, in, propCount, info); } else { error = true; @@ -1378,10 +1378,9 @@ std::pair CStateManager::LoadScriptObject(TAreaId aid, ESc if (error || ent == nullptr) { in.seek(startPos, athena::SeekOrigin::Begin); - std::string name; //= HashInstanceName(in); + std::string name = HashInstanceName(in); LogModule.report(logvisor::Error, FMT_STRING("Script load error while loading {}, name: {}"), ScriptObjectTypeToStr(type), name); - loader(*this, in, propCount, info); return {kInvalidEditorId, kInvalidUniqueId}; } else { LogModule.report(logvisor::Info, FMT_STRING("Loaded {} in area {}"), ent->GetName(), ent->GetAreaIdAlways());