CStateManager: Revert debug commit

This commit is contained in:
Luke Street 2020-04-19 21:20:25 -04:00
parent 7f6791632b
commit d5fcb4a917
1 changed files with 2 additions and 3 deletions

View File

@ -1357,8 +1357,8 @@ std::pair<TEditorId, TUniqueId> 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<TEditorId, TUniqueId> 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());