X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FInterpreter.cpp;h=e8d4ec9ff5be63fae56efcde0e3eef8ead5c8867;hb=6e88a625710c7936f87b38ecf6094472f3a49f4f;hp=5da1ff35a194f194606c573be575d797643e5486;hpb=754442d4502b743a46831055484c3fa9fa621ec2;p=l2e.git diff --git a/src/loader/Interpreter.cpp b/src/loader/Interpreter.cpp index 5da1ff3..e8d4ec9 100644 --- a/src/loader/Interpreter.cpp +++ b/src/loader/Interpreter.cpp @@ -295,6 +295,13 @@ void Interpreter::ReadObject(int typeId, int id, char *object, const PropertyLis } else { throw Error("aggregate type fields must be referenced"); } + } else if (i->second->IsLiteral() && !fd.IsReferenced()) { + // inline literals + if (i->second->GetLiteral().IsObject()) { + ReadObject(fd.TypeId(), -1, dest, *i->second->GetLiteral().GetProperties()); + } else { + ReadLiteral(fd.TypeId(), -1, dest, i->second->GetLiteral()); + } } else { char *src(reinterpret_cast(GetObject(fd.TypeId(), *i->second))); if (fd.TypeId() == TypeDescription::GetTypeId("Image")) {