mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-16 17:11:28 +00:00
Update all FOF sides when modifying offsets/skew, always reset local texture offsets with reset actions
This commit is contained in:
parent
d654fc2d79
commit
e2abbe35d9
2 changed files with 33 additions and 9 deletions
|
@ -980,6 +980,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
Sidedef.OffsetX = 0;
|
Sidedef.OffsetX = 0;
|
||||||
Sidedef.OffsetY = 0;
|
Sidedef.OffsetY = 0;
|
||||||
|
|
||||||
|
// Reset texture offsets too
|
||||||
|
SetTextureOffsetX(0);
|
||||||
|
SetTextureOffsetY(0);
|
||||||
|
|
||||||
// Update sidedef geometry
|
// Update sidedef geometry
|
||||||
VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef);
|
VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef);
|
||||||
parts.SetupAllParts();
|
parts.SetupAllParts();
|
||||||
|
@ -1148,10 +1152,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// This sets a specified flag
|
// This sets a specified flag
|
||||||
public virtual void ApplyLineFlag(string flag, string name)
|
public virtual void ApplyLineFlag(string flag, string name)
|
||||||
{
|
{
|
||||||
Linedef line = this.Sidedef.Line;
|
bool middle3d = this.GeometryType == VisualGeometryType.WALL_MIDDLE_3D;
|
||||||
|
Linedef line = middle3d ? this.GetControlLinedef() : this.Sidedef.Line;
|
||||||
if (this.GeometryType == VisualGeometryType.WALL_MIDDLE_3D)
|
|
||||||
line = this.GetControlLinedef();
|
|
||||||
|
|
||||||
if (line.IsFlagSet(flag))
|
if (line.IsFlagSet(flag))
|
||||||
{
|
{
|
||||||
|
@ -1179,6 +1181,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
parts = othersector.GetSidedefParts(Sidedef.Other);
|
parts = othersector.GetSidedefParts(Sidedef.Other);
|
||||||
parts.SetupAllParts();
|
parts.SetupAllParts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mxd. Update linked effects
|
||||||
|
SectorData sd = mode.GetSectorDataEx(Sector.Sector);
|
||||||
|
if (sd != null) sd.Reset(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -576,6 +576,24 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false);
|
mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sphere: update FOF texture offsets and skewing properly
|
||||||
|
public override bool OnChangeTextureOffset(int horizontal, int vertical, bool doSurfaceAngleCorrection)
|
||||||
|
{
|
||||||
|
base.OnChangeTextureOffset(horizontal, vertical, doSurfaceAngleCorrection);
|
||||||
|
|
||||||
|
// Update the model sector to update all 3d floors
|
||||||
|
mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public override void OnToggleSlopeSkew()
|
||||||
|
{
|
||||||
|
base.OnToggleSlopeSkew();
|
||||||
|
|
||||||
|
// Update the model sector to update all 3d floors
|
||||||
|
mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue