mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 04:51:41 +00:00
Mark rendered lines in the automap
This commit is contained in:
parent
f143b9b7b0
commit
5f1b822523
2 changed files with 10 additions and 3 deletions
|
@ -102,7 +102,7 @@ void RenderPolyScene::RenderSubsector(subsector_t *sub)
|
|||
{
|
||||
seg_t *line = &sub->firstline[i];
|
||||
if (line->sidedef == nullptr || !(line->sidedef->Flags & WALLF_POLYOBJ))
|
||||
RenderLine(line, frontsector, subsectorDepth);
|
||||
RenderLine(sub, line, frontsector, subsectorDepth);
|
||||
}
|
||||
|
||||
SpriteRange sprites = GetSpritesForSector(sub->sector);
|
||||
|
@ -136,7 +136,7 @@ SpriteRange RenderPolyScene::GetSpritesForSector(sector_t *sector)
|
|||
return range;
|
||||
}
|
||||
|
||||
void RenderPolyScene::RenderLine(seg_t *line, sector_t *frontsector, uint32_t subsectorDepth)
|
||||
void RenderPolyScene::RenderLine(subsector_t *sub, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth)
|
||||
{
|
||||
// Reject lines not facing viewer
|
||||
DVector2 pt1 = line->v1->fPos() - ViewPos;
|
||||
|
@ -150,6 +150,13 @@ void RenderPolyScene::RenderLine(seg_t *line, sector_t *frontsector, uint32_t su
|
|||
if (hasSegmentRange && Cull.IsSegmentCulled(sx1, sx2))
|
||||
return;
|
||||
|
||||
// Tell automap we saw this
|
||||
if (!r_dontmaplines && line->linedef)
|
||||
{
|
||||
line->linedef->flags |= ML_MAPPED;
|
||||
sub->flags |= SSECF_DRAWN;
|
||||
}
|
||||
|
||||
// Render wall, and update culling info if its an occlusion blocker
|
||||
if (RenderPolyWall::RenderLine(WorldToClip, line, frontsector, subsectorDepth, SubsectorTranslucentWalls))
|
||||
{
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
|
||||
private:
|
||||
void RenderSubsector(subsector_t *sub);
|
||||
void RenderLine(seg_t *line, sector_t *frontsector, uint32_t subsectorDepth);
|
||||
void RenderLine(subsector_t *sub, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth);
|
||||
|
||||
void RenderTranslucent();
|
||||
SpriteRange GetSpritesForSector(sector_t *sector);
|
||||
|
|
Loading…
Reference in a new issue