Skip over unused fields in OBJD

This commit is contained in:
LazyDuchess 2023-02-01 19:46:19 -03:00
parent 1482af268f
commit 3e0abd9f48

View file

@ -38,9 +38,10 @@ namespace OpenTS2.Files.Formats.DBPF
foreach (var field in ObjectDefinitionAsset.Fields)
{
var value = reader.ReadUInt16();
if (field == "unused")
continue;
assetType.GetProperty(field).SetValue(asset, reader.ReadUInt16());
assetType.GetProperty(field).SetValue(asset, value);
}
return asset;
}