mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Finally fix repeating midtexture selection in Visual Mode
This commit is contained in:
parent
1435208163
commit
78e6f5b114
1 changed files with 5 additions and 3 deletions
|
@ -39,6 +39,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
#region ================== Variables
|
||||
|
||||
private bool repeatmidtex;
|
||||
private bool srb2repeatfixed;
|
||||
|
||||
private Plane topclipplane;
|
||||
private Plane bottomclipplane;
|
||||
|
||||
|
@ -154,7 +156,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
repeatmidtex = srb2repeat || doomrepeat;
|
||||
|
||||
//A little redundant, but having a separate boolean value for each case makes the code a little more readable
|
||||
bool srb2repeatfixed = srb2repeat && Sidedef.OffsetX >= 4096;
|
||||
srb2repeatfixed = srb2repeat && Sidedef.OffsetX >= 4096;
|
||||
bool srb2repeatindefinite = srb2repeat && !srb2repeatfixed;
|
||||
|
||||
float topheight = !General.Map.SRB2 || Sidedef.Line.IsFlagSet("128") ? geotop : geoplanetop;
|
||||
|
@ -384,7 +386,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This performs a fast test in object picking
|
||||
public override bool PickFastReject(Vector3D from, Vector3D to, Vector3D dir)
|
||||
{
|
||||
if(!repeatmidtex)
|
||||
if(!repeatmidtex || srb2repeatfixed)
|
||||
{
|
||||
// When the texture is not repeated, leave when outside crop planes
|
||||
if((pickintersect.z < bottomclipplane.GetZ(pickintersect)) ||
|
||||
|
@ -409,7 +411,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
int ox = (int)Math.Floor((u * Sidedef.Line.Length * UniFields.GetFloat(Sidedef.Fields, "scalex_mid", 1.0f) / Texture.Scale.x + Sidedef.OffsetX + UniFields.GetFloat(Sidedef.Fields, "offsetx_mid")) % Texture.Width);
|
||||
int oy;
|
||||
|
||||
if(repeatmidtex)
|
||||
if(repeatmidtex && !srb2repeatfixed)
|
||||
{
|
||||
if(IsLowerUnpegged())
|
||||
zoffset = Sidedef.Sector.FloorHeight;
|
||||
|
|
Loading…
Reference in a new issue