diff --git a/source/core/maphack.cpp b/source/core/maphack.cpp index b5b2058a9..278678820 100644 --- a/source/core/maphack.cpp +++ b/source/core/maphack.cpp @@ -190,6 +190,10 @@ static int32_t LoadMapHack(const char *filename, SpawnSpriteDef& sprites) hw_SetSplitSector(currentsector, start, end); } } + else if (sc.Compare("dontclip")) + { + sector[currentsector].exflags |= SECTOREX_DONTCLIP; + } else if (sc.Compare("clearflags")) { if (currentsector != -1 && validateSector()) diff --git a/source/core/maploader.cpp b/source/core/maploader.cpp index 8f2a30d6b..da36008e6 100644 --- a/source/core/maploader.cpp +++ b/source/core/maploader.cpp @@ -787,7 +787,6 @@ void setWallSectors() for(auto& sect: sector) { sect.dirty = EDirty::AllDirty; - sect.exflags = 0; for (auto& wal : wallsofsector(§)) { if (wal.sector == -1) diff --git a/source/core/maptypes.h b/source/core/maptypes.h index ecf37d288..2d4b8d81d 100644 --- a/source/core/maptypes.h +++ b/source/core/maptypes.h @@ -94,6 +94,7 @@ enum ESectorExBits { SECTOREX_CLOUDSCROLL = 1, SECTOREX_DRAGGED = 2, + SECTOREX_DONTCLIP = 4, }; // Flags for retriangulation diff --git a/source/core/rendering/scene/hw_bunchdrawer.cpp b/source/core/rendering/scene/hw_bunchdrawer.cpp index 8557d8c5e..ffe00b25a 100644 --- a/source/core/rendering/scene/hw_bunchdrawer.cpp +++ b/source/core/rendering/scene/hw_bunchdrawer.cpp @@ -278,7 +278,7 @@ int BunchDrawer::ClipLine(int aline, bool portal) if (cline->partner == -1 || (wall[line].cstat & CSTAT_WALL_1WAY) || CheckClip(&wall[line], &topclip, &bottomclip)) { // one-sided - if (!portal && !dontclip) + if (!portal && !dontclip && !(sector[sections[section].sector].exflags & SECTOREX_DONTCLIP)) { clipper->AddClipRange(startAngle, endAngle); //Printf("\nWall %d from %2.3f - %2.3f (blocking)\n", line, bamang(startAngle).asdeg(), bamang(endAngle).asdeg()); diff --git a/source/core/savegamehelp.cpp b/source/core/savegamehelp.cpp index 1672bf7f4..9fe573921 100644 --- a/source/core/savegamehelp.cpp +++ b/source/core/savegamehelp.cpp @@ -535,7 +535,8 @@ FSerializer &Serialize(FSerializer &arc, const char *key, sectortype &c, sectort ("hitag", c.hitag, def->hitag) ("extra", c.extra, def->extra) ("portalflags", c.portalflags, def->portalflags) - ("portalnum", c.portalnum, def->portalnum); + ("portalnum", c.portalnum, def->portalnum) + ("exflags", c.exflags, def->exflags); // Save the extensions only when playing their respective games. if (isDukeLike()) diff --git a/wadsrc/static/engine/compatibility/25d4164814f10cd71d26d52d494c4fb8.mhk b/wadsrc/static/engine/compatibility/25d4164814f10cd71d26d52d494c4fb8.mhk new file mode 100644 index 000000000..f1999796f --- /dev/null +++ b/wadsrc/static/engine/compatibility/25d4164814f10cd71d26d52d494c4fb8.mhk @@ -0,0 +1,2 @@ +// Wanton Destruction $auto.map - workaround for sector object overlapping with an outer wall. +sector 152 dontclip