mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-30 07:31:36 +00:00
Visual mode, auto align textures: vertical texture offsets of middle sidedefs are no longer clamped by texture height when said sidedefs are parts of 3d floor or are double-sided and not wrapped.
This commit is contained in:
parent
1be5a9e2ab
commit
766e4d46f3
1 changed files with 9 additions and 2 deletions
|
@ -3218,9 +3218,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(j.sidedef.Index != j.controlSide.Index) {
|
||||
offset -= j.controlSide.OffsetY;
|
||||
offset -= j.controlSide.Fields.GetValue("offsety_mid", 0.0f);
|
||||
j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, offset % texture.Height);
|
||||
j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, offset);
|
||||
} else {
|
||||
j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, GetMiddleOffsetY(j.sidedef, offset, j.scaleY, true) % texture.Height);//mxd
|
||||
offset = GetMiddleOffsetY(j.sidedef, offset, j.scaleY, true);
|
||||
|
||||
//mxd. Clamp offset if this part is middle single or wrapped middle double
|
||||
if(j.sidedef.Other == null || j.sidedef.IsFlagSet("wrapmidtex") || j.sidedef.Line.IsFlagSet("wrapmidtex")) {
|
||||
offset %= texture.Height;
|
||||
}
|
||||
|
||||
j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, offset);//mxd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue