From 2f701c471b781128d862c3b4f78e44366d54ceb3 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 17 Aug 2024 20:54:10 +0100 Subject: [PATCH] Handle version 3 model polygons correctly --- patterns/Model.hexpat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/patterns/Model.hexpat b/patterns/Model.hexpat index fc58f0d..a9ee133 100644 --- a/patterns/Model.hexpat +++ b/patterns/Model.hexpat @@ -64,7 +64,9 @@ struct Polygon { if (type == 0x1B) { u16 uv_indices[vertex_count]; } - u8 material; // Only in version 4 + if (parent.version == 4) { + u8 material; + } }; struct Model {