mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
UDMF sector slopes: looks like 4-th parameter is used in GZDoom after all :)
This commit is contained in:
parent
a61bba2536
commit
e6204be571
1 changed files with 7 additions and 5 deletions
|
@ -18,17 +18,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
|
||||
// This makes sure we are updated with the source linedef information
|
||||
// This makes sure we are updated
|
||||
public override void Update()
|
||||
{
|
||||
if (ceilingslope) {
|
||||
float a = data.Sector.Fields.GetValue("ceilingplane_a", 0f);
|
||||
float b = data.Sector.Fields.GetValue("ceilingplane_b", 0f);
|
||||
float c = data.Sector.Fields.GetValue("ceilingplane_c", 0f);
|
||||
float d = 0; //data.Sector.Fields.GetValue("ceilingplane_d", 0f);
|
||||
float d = data.Sector.Fields.GetValue("ceilingplane_d", 0f);
|
||||
|
||||
Vector3D normal = new Vector3D(a, b, c).GetNormal();
|
||||
if (normal.x != 0 || normal.y != 0 || normal.z != 0) {
|
||||
if (normal.x != 0 || normal.y != 0 || normal.z != 0)
|
||||
{
|
||||
if(normal.z > 0) normal = -normal; //flip the plane if it's facing the wrong direction
|
||||
data.Ceiling.plane = new Plane(normal, d);
|
||||
}
|
||||
|
@ -38,10 +39,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
float a = data.Sector.Fields.GetValue("floorplane_a", 0f);
|
||||
float b = data.Sector.Fields.GetValue("floorplane_b", 0f);
|
||||
float c = data.Sector.Fields.GetValue("floorplane_c", 0f);
|
||||
float d = 0; //data.Sector.Fields.GetValue("floorplane_d", 0f);
|
||||
float d = data.Sector.Fields.GetValue("floorplane_d", 0f);
|
||||
|
||||
Vector3D normal = new Vector3D(a, b, c).GetNormal();
|
||||
if (normal.x != 0 || normal.y != 0 || normal.z != 0) {
|
||||
if (normal.x != 0 || normal.y != 0 || normal.z != 0)
|
||||
{
|
||||
if(normal.z < 0) normal = -normal; //flip the plane if it's facing the wrong direction
|
||||
data.Floor.plane = new Plane(normal, d);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue