Rename PropScale to PropVector
This commit is contained in:
parent
b959fb97c2
commit
a08fd190f8
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ public class DbFile
|
|||
"WREXT" => new WorldRep(),
|
||||
"BRLIST" => new BrList(),
|
||||
"P$ModelName" => new PropertyChunk<PropLabel>(),
|
||||
"P$Scale" => new PropertyChunk<PropScale>(),
|
||||
"P$Scale" => new PropertyChunk<PropVector>(),
|
||||
"P$RenderTyp" => new PropertyChunk<PropRenderType>(),
|
||||
"P$OTxtRepr0" => new PropertyChunk<PropString>(),
|
||||
"P$OTxtRepr1" => new PropertyChunk<PropString>(),
|
||||
|
|
|
@ -92,7 +92,7 @@ public class ObjectHierarchy
|
|||
}
|
||||
|
||||
AddProp<PropLabel>("P$ModelName");
|
||||
AddProp<PropScale>("P$Scale");
|
||||
AddProp<PropVector>("P$Scale");
|
||||
AddProp<PropRenderType>("P$RenderTyp");
|
||||
AddProp<PropString>("P$OTxtRepr0");
|
||||
AddProp<PropString>("P$OTxtRepr1");
|
||||
|
|
|
@ -247,7 +247,7 @@ public partial class Mission : Node3D
|
|||
|
||||
var id = (int)brush.brushInfo;
|
||||
var modelNameProp = objHierarchy.GetProperty<PropLabel>(id, "P$ModelName");
|
||||
var scaleProp = objHierarchy.GetProperty<PropScale>(id, "P$Scale");
|
||||
var scaleProp = objHierarchy.GetProperty<PropVector>(id, "P$Scale");
|
||||
var renderTypeProp = objHierarchy.GetProperty<PropRenderType>(id, "P$RenderTyp");
|
||||
var txtRepl0 = objHierarchy.GetProperty<PropString>(id, "P$OTxtRepr0");
|
||||
var txtRepl1 = objHierarchy.GetProperty<PropString>(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);
|
||||
|
|
Loading…
Reference in New Issue