Fix index offset mis-cast causing overflow

This commit is contained in:
ackwell 2024-02-20 21:35:14 +11:00 committed by Ottermandias
parent 1cee1c24ec
commit a4bd015836

View file

@ -167,7 +167,7 @@ public class MeshImporter(IEnumerable<Node> nodes, IoNotifier notifier)
// And finally, merge in the sub-mesh struct itself.
_subMeshes.Add(subMesh.SubMeshStruct with
{
IndexOffset = (ushort)(subMesh.SubMeshStruct.IndexOffset + indexOffset),
IndexOffset = (uint)(subMesh.SubMeshStruct.IndexOffset + indexOffset),
AttributeIndexMask = Utility.GetMergedAttributeMask(
subMesh.SubMeshStruct.AttributeIndexMask, subMesh.MetaAttributes, _metaAttributes),
});