From fa1a3ac00e2a5f3c64269ceb97ae52ca13ce2a05 Mon Sep 17 00:00:00 2001 From: dexy Date: Wed, 15 Jan 2020 20:03:16 +1100 Subject: [PATCH] Bug fix for modded .ydr saving --- CodeWalker.Core/GameFiles/Resources/Drawable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeWalker.Core/GameFiles/Resources/Drawable.cs b/CodeWalker.Core/GameFiles/Resources/Drawable.cs index 227a904..d3cd62d 100644 --- a/CodeWalker.Core/GameFiles/Resources/Drawable.cs +++ b/CodeWalker.Core/GameFiles/Resources/Drawable.cs @@ -1776,7 +1776,7 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data - this.VertexCount = (uint)(this.Data1 != null ? this.Data1.VertexCount : 0); + this.VertexCount = (uint)(this.Data1 != null ? this.Data1.VertexCount : this.Data2 != null ? this.Data2.VertexCount : 0); this.DataPointer1 = (ulong)(this.Data1 != null ? this.Data1.FilePosition : 0); this.DataPointer2 = (ulong)(this.Data2 != null ? this.Data2.FilePosition : 0); this.InfoPointer = (ulong)(this.Info != null ? this.Info.FilePosition : 0);