diff --git a/src/r_plane.cpp b/src/r_plane.cpp index ea2678e96..394a77993 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -1294,6 +1294,7 @@ void R_DrawSkyBoxes () ds_p->sprtopclip = R_NewOpening (pl->maxx - pl->minx + 1); ds_p->maskedtexturecol = ds_p->swall = -1; ds_p->bFogBoundary = false; + ds_p->curline = NULL; memcpy (openings + ds_p->sprbottomclip, floorclip + pl->minx, (pl->maxx - pl->minx + 1)*sizeof(short)); memcpy (openings + ds_p->sprtopclip, ceilingclip + pl->minx, (pl->maxx - pl->minx + 1)*sizeof(short)); diff --git a/src/r_things.cpp b/src/r_things.cpp index cbcfbc295..3a6773c70 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -322,11 +322,8 @@ nextpost: // bool R_ClipSpriteColumnWithPortals (fixed_t x, fixed_t y, vissprite_t* spr) { - size_t numdrawsegs = ds_p-firstdrawseg; - for (int i = (int)numdrawsegs-1; i >= 0; i--) + for (drawseg_t* seg = ds_p; seg-- > firstdrawseg; ) // copied code from killough below { - drawseg_t* seg = &firstdrawseg[i]; - // ignore segs from other portals if (seg->CurrentPortalUniq != CurrentPortalUniq) continue;