2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-06-07 08:57:42 +00:00

fix: pointer lookup for assets that should be reusable

This commit is contained in:
Jan 2025-06-04 22:57:57 +01:00
parent c822ede9e3
commit e7dc99e4df
No known key found for this signature in database
GPG Key ID: 44B581F78FF5C57C

View File

@ -565,7 +565,7 @@ namespace
MakeMemberAccess(&structInfo, &memberInfo, modifier),
OffsetForMemberModifier(memberInfo, modifier, nestedBaseOffset))
if (memberInfo.m_is_reusable)
if (memberInfo.m_is_reusable || (memberInfo.m_type && StructureComputations(memberInfo.m_type).IsAsset()))
{
LINEF("fillAccessor.InsertPointerRedirect(m_stream.AllocRedirectEntry({0}), {1});",
MakeMemberAccess(&structInfo, &memberInfo, modifier),
@ -1017,7 +1017,7 @@ namespace
m_intendation++;
LINEF("ptrArrayFill.FillPtr({0}[index], {1} * index);", MakeTypePtrVarName(def), m_env.m_pointer_size)
if (reusable)
if (reusable || (info && StructureComputations(info).IsAsset()))
{
LINEF("ptrArrayFill.InsertPointerRedirect(m_stream.AllocRedirectEntry({0}[index]), {1} * index);",
MakeTypePtrVarName(def),