From a08fd190f8b0553881559e036f55436ef225326b Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 7 Sep 2024 11:18:40 +0100 Subject: [PATCH] Rename PropScale to PropVector --- project/code/LGS/Database/Chunks/Property.cs | 6 +++--- project/code/LGS/Database/File.cs | 2 +- project/code/LGS/Database/ObjectHierarchy.cs | 2 +- project/code/TMV/Mission.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/project/code/LGS/Database/Chunks/Property.cs b/project/code/LGS/Database/Chunks/Property.cs index 28804c8..f384a6f 100644 --- a/project/code/LGS/Database/Chunks/Property.cs +++ b/project/code/LGS/Database/Chunks/Property.cs @@ -111,14 +111,14 @@ public class PropFloat : Property } } -public class PropScale : Property +public class PropVector : Property { - public Vector3 scale; + public Vector3 value; public override void Read(BinaryReader reader) { base.Read(reader); - scale = reader.ReadVec3(); + value = reader.ReadVec3(); } } diff --git a/project/code/LGS/Database/File.cs b/project/code/LGS/Database/File.cs index 606aa2a..89ed448 100644 --- a/project/code/LGS/Database/File.cs +++ b/project/code/LGS/Database/File.cs @@ -102,7 +102,7 @@ public class DbFile "WREXT" => new WorldRep(), "BRLIST" => new BrList(), "P$ModelName" => new PropertyChunk(), - "P$Scale" => new PropertyChunk(), + "P$Scale" => new PropertyChunk(), "P$RenderTyp" => new PropertyChunk(), "P$OTxtRepr0" => new PropertyChunk(), "P$OTxtRepr1" => new PropertyChunk(), diff --git a/project/code/LGS/Database/ObjectHierarchy.cs b/project/code/LGS/Database/ObjectHierarchy.cs index a8ddfcb..e76d3cc 100644 --- a/project/code/LGS/Database/ObjectHierarchy.cs +++ b/project/code/LGS/Database/ObjectHierarchy.cs @@ -92,7 +92,7 @@ public class ObjectHierarchy } AddProp("P$ModelName"); - AddProp("P$Scale"); + AddProp("P$Scale"); AddProp("P$RenderTyp"); AddProp("P$OTxtRepr0"); AddProp("P$OTxtRepr1"); diff --git a/project/code/TMV/Mission.cs b/project/code/TMV/Mission.cs index 4c44ad2..c73f3d4 100644 --- a/project/code/TMV/Mission.cs +++ b/project/code/TMV/Mission.cs @@ -247,7 +247,7 @@ public partial class Mission : Node3D var id = (int)brush.brushInfo; var modelNameProp = objHierarchy.GetProperty(id, "P$ModelName"); - var scaleProp = objHierarchy.GetProperty(id, "P$Scale"); + var scaleProp = objHierarchy.GetProperty(id, "P$Scale"); var renderTypeProp = objHierarchy.GetProperty(id, "P$RenderTyp"); var txtRepl0 = objHierarchy.GetProperty(id, "P$OTxtRepr0"); var txtRepl1 = objHierarchy.GetProperty(id, "P$OTxtRepr1"); @@ -266,7 +266,7 @@ public partial class Mission : Node3D var pos = brush.position.ToGodotVec3(); var rawRot = brush.angle; var rot = new Vector3(rawRot.Y, rawRot.Z, rawRot.X) * 360 / ushort.MaxValue; - var scale = scaleProp == null ? Vector3.One : scaleProp.scale.ToGodotVec3(false); + var scale = scaleProp == null ? Vector3.One : scaleProp.value.ToGodotVec3(false); var model = Timing.TimeStage("Get Models", () => { return Context.Instance.ModelLoader.Load(_campaignName, modelName);