mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- crash fix and minor optimization.
This commit is contained in:
parent
1f32f5a258
commit
aa12772e07
2 changed files with 6 additions and 4 deletions
|
@ -141,11 +141,13 @@ static void AddLine (seg_t *seg, bool portalclip)
|
||||||
}
|
}
|
||||||
currentsubsector->flags |= SSECF_DRAWN;
|
currentsubsector->flags |= SSECF_DRAWN;
|
||||||
|
|
||||||
|
BYTE ispoly = BYTE(seg->sidedef->Flags & WALLF_POLYOBJ);
|
||||||
|
|
||||||
if (!seg->backsector)
|
if (!seg->backsector)
|
||||||
{
|
{
|
||||||
clipper.SafeAddClipRange(startAngle, endAngle);
|
clipper.SafeAddClipRange(startAngle, endAngle);
|
||||||
}
|
}
|
||||||
else if (!(seg->sidedef->Flags & WALLF_POLYOBJ)) // Two-sided polyobjects never obstruct the view
|
else if (!ispoly) // Two-sided polyobjects never obstruct the view
|
||||||
{
|
{
|
||||||
if (currentsector->sectornum == seg->backsector->sectornum)
|
if (currentsector->sectornum == seg->backsector->sectornum)
|
||||||
{
|
{
|
||||||
|
@ -179,9 +181,9 @@ static void AddLine (seg_t *seg, bool portalclip)
|
||||||
|
|
||||||
seg->linedef->flags |= ML_MAPPED;
|
seg->linedef->flags |= ML_MAPPED;
|
||||||
|
|
||||||
if ((seg->sidedef->Flags & WALLF_POLYOBJ) || seg->linedef->validcount!=validcount)
|
if (ispoly || seg->linedef->validcount!=validcount)
|
||||||
{
|
{
|
||||||
if (!(seg->sidedef->Flags & WALLF_POLYOBJ)) seg->linedef->validcount=validcount;
|
if (!ispoly) seg->linedef->validcount=validcount;
|
||||||
|
|
||||||
if (gl_render_walls)
|
if (gl_render_walls)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1001,7 +1001,7 @@ public:
|
||||||
|
|
||||||
int GetPortalType(int plane)
|
int GetPortalType(int plane)
|
||||||
{
|
{
|
||||||
return SkyBoxes[plane]->special1;
|
return SkyBoxes[plane] == nullptr? -1 : SkyBoxes[plane]->special1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetOppositePortalGroup(int plane)
|
int GetOppositePortalGroup(int plane)
|
||||||
|
|
Loading…
Reference in a new issue