mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 12:22:35 +00:00
@ Fixed bug in middle texture offsets on doublesided lines
This commit is contained in:
parent
7e4bf95a39
commit
99f8e01495
1 changed files with 3 additions and 3 deletions
|
@ -143,10 +143,12 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
|
|||
// height is 0 then the TexturePlane doesn't work!
|
||||
TexturePlane tp = new TexturePlane();
|
||||
float floorbias = (Sidedef.Sector.CeilHeight == Sidedef.Sector.FloorHeight) ? 1.0f : 0.0f;
|
||||
float geotop = (float)Math.Min(Sidedef.Sector.CeilHeight, Sidedef.Other.Sector.CeilHeight);
|
||||
float geobottom = (float)Math.Max(Sidedef.Sector.FloorHeight, Sidedef.Other.Sector.FloorHeight);
|
||||
if(Sidedef.Line.IsFlagSet(General.Map.Config.LowerUnpeggedFlag))
|
||||
{
|
||||
// When lower unpegged is set, the middle texture is bound to the bottom
|
||||
tp.tlt.y = tsz.y - (float)(Sidedef.Sector.CeilHeight - Sidedef.Sector.FloorHeight);
|
||||
tp.tlt.y = tsz.y - (float)(geotop - geobottom);
|
||||
}
|
||||
tp.trb.x = tp.tlt.x + Sidedef.Line.Length;
|
||||
tp.trb.y = tp.tlt.y + ((float)Sidedef.Sector.CeilHeight - ((float)Sidedef.Sector.FloorHeight + floorbias));
|
||||
|
@ -197,8 +199,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
|
|||
if(!repeatmidtex)
|
||||
{
|
||||
// First determine the visible portion of the texture
|
||||
float geotop = (float)Math.Min(Sidedef.Sector.CeilHeight, Sidedef.Other.Sector.CeilHeight);
|
||||
float geobottom = (float)Math.Max(Sidedef.Sector.FloorHeight, Sidedef.Other.Sector.FloorHeight);
|
||||
float textop, texbottom;
|
||||
|
||||
// Determine top portion height
|
||||
|
|
Loading…
Reference in a new issue