From 4e1a5144551473293594550ef1ceeec306f60492 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 28 Aug 2010 16:51:41 +0000 Subject: [PATCH] - fixed: Subsectors which are the origin of polyobjects should not be drawn on the textured automap because the vertices no longer are where they'd be expected to be. SVN r2622 (trunk) --- src/am_map.cpp | 5 +++++ src/po_man.cpp | 17 +++++++++++++++++ src/r_defs.h | 1 + 3 files changed, 23 insertions(+) diff --git a/src/am_map.cpp b/src/am_map.cpp index fd3f4373f..ea5e9c3b4 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -1609,6 +1609,11 @@ void AM_drawSubsectors() for (int i = 0; i < numsubsectors; ++i) { + if (subsectors[i].flags & SSECF_POLYORG) + { + continue; + } + if ((!(subsectors[i].flags & SSECF_DRAWN) || (subsectors[i].render_sector->MoreFlags & SECF_HIDDEN)) && am_cheat == 0) { continue; diff --git a/src/po_man.cpp b/src/po_man.cpp index da8399b3d..0f9b0b15a 100644 --- a/src/po_man.cpp +++ b/src/po_man.cpp @@ -1846,6 +1846,23 @@ void PO_Init (void) double fdy = (double)no->dy; no->len = (float)sqrt(fdx * fdx + fdy * fdy); } + + // mark all subsectors which have a seg belonging to a polyobj + // These ones should not be rendered on the textured automap. + for (int i = 0; i < numsubsectors; i++) + { + subsector_t *ss = &subsectors[i]; + for(DWORD j=0;jnumlines; j++) + { + if (ss->firstline[j].sidedef != NULL && + ss->firstline[j].sidedef->Flags & WALLF_POLYOBJ) + { + ss->flags |= SSECF_POLYORG; + break; + } + } + } + } //========================================================================== diff --git a/src/r_defs.h b/src/r_defs.h index 55b896a80..9e0477ac2 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -962,6 +962,7 @@ enum { SSECF_DEGENERATE = 1, SSECF_DRAWN = 2, + SSECF_POLYORG = 4, }; struct subsector_t