mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-22 03:41:47 +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.OffsetY = 0;
|
||||
|
||||
// Reset texture offsets too
|
||||
SetTextureOffsetX(0);
|
||||
SetTextureOffsetY(0);
|
||||
|
||||
// Update sidedef geometry
|
||||
VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef);
|
||||
parts.SetupAllParts();
|
||||
|
@ -1148,10 +1152,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This sets a specified flag
|
||||
public virtual void ApplyLineFlag(string flag, string name)
|
||||
{
|
||||
Linedef line = this.Sidedef.Line;
|
||||
|
||||
if (this.GeometryType == VisualGeometryType.WALL_MIDDLE_3D)
|
||||
line = this.GetControlLinedef();
|
||||
bool middle3d = this.GeometryType == VisualGeometryType.WALL_MIDDLE_3D;
|
||||
Linedef line = middle3d ? this.GetControlLinedef() : this.Sidedef.Line;
|
||||
|
||||
if (line.IsFlagSet(flag))
|
||||
{
|
||||
|
@ -1179,6 +1181,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
parts = othersector.GetSidedefParts(Sidedef.Other);
|
||||
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);
|
||||
}
|
||||
|
||||
//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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue