mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Add some more safeguards to Visual Mode
This commit is contained in:
parent
bed5298a3f
commit
eb28b2aa70
2 changed files with 4 additions and 1 deletions
|
@ -57,7 +57,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
if (t.Parameter > 0)
|
if (t.Parameter > 0)
|
||||||
position.z = t.GetFlagsValue();
|
position.z = t.GetFlagsValue();
|
||||||
else
|
else
|
||||||
position.z += t.Sector.FloorHeight;
|
position.z = (t.Sector != null) ? t.Sector.FloorHeight : 0;
|
||||||
verts[index] = position;
|
verts[index] = position;
|
||||||
index++;
|
index++;
|
||||||
if (index > 2) break; //Only the first three vertices are used
|
if (index > 2) break; //Only the first three vertices are used
|
||||||
|
|
|
@ -227,6 +227,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// Anything to see?
|
// Anything to see?
|
||||||
if(((cl - fl) > 0.01f) || ((cr - fr) > 0.01f))
|
if(((cl - fl) > 0.01f) || ((cr - fr) > 0.01f))
|
||||||
{
|
{
|
||||||
|
if (extrafloor.Floor == null || extrafloor.Ceiling == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
// Keep top and bottom planes for intersection testing
|
// Keep top and bottom planes for intersection testing
|
||||||
top = extrafloor.Floor.plane;
|
top = extrafloor.Floor.plane;
|
||||||
bottom = extrafloor.Ceiling.plane;
|
bottom = extrafloor.Ceiling.plane;
|
||||||
|
|
Loading…
Reference in a new issue