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)
|
public override void Read(BinaryReader reader)
|
||||||
{
|
{
|
||||||
base.Read(reader);
|
base.Read(reader);
|
||||||
scale = reader.ReadVec3();
|
value = reader.ReadVec3();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class DbFile
|
||||||
"WREXT" => new WorldRep(),
|
"WREXT" => new WorldRep(),
|
||||||
"BRLIST" => new BrList(),
|
"BRLIST" => new BrList(),
|
||||||
"P$ModelName" => new PropertyChunk<PropLabel>(),
|
"P$ModelName" => new PropertyChunk<PropLabel>(),
|
||||||
"P$Scale" => new PropertyChunk<PropScale>(),
|
"P$Scale" => new PropertyChunk<PropVector>(),
|
||||||
"P$RenderTyp" => new PropertyChunk<PropRenderType>(),
|
"P$RenderTyp" => new PropertyChunk<PropRenderType>(),
|
||||||
"P$OTxtRepr0" => new PropertyChunk<PropString>(),
|
"P$OTxtRepr0" => new PropertyChunk<PropString>(),
|
||||||
"P$OTxtRepr1" => new PropertyChunk<PropString>(),
|
"P$OTxtRepr1" => new PropertyChunk<PropString>(),
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class ObjectHierarchy
|
||||||
}
|
}
|
||||||
|
|
||||||
AddProp<PropLabel>("P$ModelName");
|
AddProp<PropLabel>("P$ModelName");
|
||||||
AddProp<PropScale>("P$Scale");
|
AddProp<PropVector>("P$Scale");
|
||||||
AddProp<PropRenderType>("P$RenderTyp");
|
AddProp<PropRenderType>("P$RenderTyp");
|
||||||
AddProp<PropString>("P$OTxtRepr0");
|
AddProp<PropString>("P$OTxtRepr0");
|
||||||
AddProp<PropString>("P$OTxtRepr1");
|
AddProp<PropString>("P$OTxtRepr1");
|
||||||
|
|
|
@ -247,7 +247,7 @@ public partial class Mission : Node3D
|
||||||
|
|
||||||
var id = (int)brush.brushInfo;
|
var id = (int)brush.brushInfo;
|
||||||
var modelNameProp = objHierarchy.GetProperty<PropLabel>(id, "P$ModelName");
|
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 renderTypeProp = objHierarchy.GetProperty<PropRenderType>(id, "P$RenderTyp");
|
||||||
var txtRepl0 = objHierarchy.GetProperty<PropString>(id, "P$OTxtRepr0");
|
var txtRepl0 = objHierarchy.GetProperty<PropString>(id, "P$OTxtRepr0");
|
||||||
var txtRepl1 = objHierarchy.GetProperty<PropString>(id, "P$OTxtRepr1");
|
var txtRepl1 = objHierarchy.GetProperty<PropString>(id, "P$OTxtRepr1");
|
||||||
|
@ -266,7 +266,7 @@ public partial class Mission : Node3D
|
||||||
var pos = brush.position.ToGodotVec3();
|
var pos = brush.position.ToGodotVec3();
|
||||||
var rawRot = brush.angle;
|
var rawRot = brush.angle;
|
||||||
var rot = new Vector3(rawRot.Y, rawRot.Z, rawRot.X) * 360 / ushort.MaxValue;
|
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", () =>
|
var model = Timing.TimeStage("Get Models", () =>
|
||||||
{
|
{
|
||||||
return Context.Instance.ModelLoader.Load(_campaignName, modelName);
|
return Context.Instance.ModelLoader.Load(_campaignName, modelName);
|
||||||
|
|
Loading…
Reference in New Issue