mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
Map Analysis Mode: fixed a crash when the sidedef of 1-sided lines had upper/lower textures defined. Fixes #533
This commit is contained in:
parent
1e3cf5ccec
commit
d3a578c6cc
1 changed files with 6 additions and 5 deletions
|
@ -310,7 +310,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
return ((int)Tools.GetSidedefMiddleOffsetY(target, target.OffsetY + GetSidedefValue(target, matchingparttype, "offsety", 0f), linescaley, false) + partheight) % textureheight;
|
||||
}
|
||||
|
||||
if(target.HighTexture == texturename
|
||||
// Only check upper and lower textures if the sidedef as an other side. See https://github.com/jewalky/UltimateDoomBuilder/issues/533
|
||||
if (target.Other != null && target.HighTexture == texturename
|
||||
&& partsize.IntersectsWith(BuilderModesTools.GetSidedefPartSize(target, VisualGeometryType.WALL_UPPER)))
|
||||
{
|
||||
matchingparttype = VisualGeometryType.WALL_UPPER;
|
||||
|
@ -318,7 +319,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
return ((int)Tools.GetSidedefTopOffsetY(target, target.OffsetY + GetSidedefValue(target, matchingparttype, "offsety", 0f), linescaley, false) + partheight) % textureheight;
|
||||
}
|
||||
|
||||
if(target.LowTexture == texturename
|
||||
if (target.Other != null && target.LowTexture == texturename
|
||||
&& partsize.IntersectsWith(BuilderModesTools.GetSidedefPartSize(target, VisualGeometryType.WALL_LOWER)))
|
||||
{
|
||||
matchingparttype = VisualGeometryType.WALL_LOWER;
|
||||
|
|
Loading…
Reference in a new issue