From a7cbfa7be35390572cccf9a75341588f0c0de45c Mon Sep 17 00:00:00 2001 From: Carmine Date: Tue, 27 Feb 2018 19:08:16 +0100 Subject: [PATCH] Ymap: Removed useless rage__fwGrassInstanceListDef array --- CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs index f04e256..7eb1c56 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs @@ -29,7 +29,6 @@ namespace CodeWalker.GameFiles public Unk_975711773[] CBoxOccluders { get; set; } public Unk_2741784237[] COccludeModels { get; set; } - public rage__fwGrassInstanceListDef[] GrassInstanceList { get; set; } public string[] Strings { get; set; } @@ -576,7 +575,6 @@ namespace CodeWalker.GameFiles { if (GrassInstanceBatches == null) { - GrassInstanceList = null; return; } @@ -584,17 +582,18 @@ namespace CodeWalker.GameFiles { } int count = GrassInstanceBatches.Length; - GrassInstanceList = new rage__fwGrassInstanceListDef[count]; for (int i = 0; i < count; i++) { - var b = GrassInstanceBatches[i]; + var g = GrassInstanceBatches[i]; + var b = g.Batch; var aabb = new rage__spdAABB(); - aabb.min = new Vector4(b.AABBMin, 0); - aabb.max = new Vector4(b.AABBMax, 0); + aabb.min = new Vector4(g.AABBMin, 0); + aabb.max = new Vector4(g.AABBMax, 0); - GrassInstanceList[i] = b.Batch; - GrassInstanceList[i].BatchAABB = aabb; + b.BatchAABB = aabb; + + GrassInstanceBatches[i].Batch = b; } }