mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-03-12 12:12:04 +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)
|
||||
position.z = t.GetFlagsValue();
|
||||
else
|
||||
position.z += t.Sector.FloorHeight;
|
||||
position.z = (t.Sector != null) ? t.Sector.FloorHeight : 0;
|
||||
verts[index] = position;
|
||||
index++;
|
||||
if (index > 2) break; //Only the first three vertices are used
|
||||
|
|
|
@ -227,6 +227,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Anything to see?
|
||||
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
|
||||
top = extrafloor.Floor.plane;
|
||||
bottom = extrafloor.Ceiling.plane;
|
||||
|
|
Loading…
Reference in a new issue