From 1bf654036ad61e4c3aa7046c93cdb233fe195629 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 14 Dec 2021 13:37:08 +0100 Subject: [PATCH] - delete duplicated walls in RRRA E1L3 and E1L6. --- source/core/maploader.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/core/maploader.cpp b/source/core/maploader.cpp index 704310810..93aaa32e2 100644 --- a/source/core/maploader.cpp +++ b/source/core/maploader.cpp @@ -584,6 +584,17 @@ void setWallSectors() i++; } + for (unsigned i = 1; i < wall.Size() - 1; i++) + { + // two maps in RRRA have this error. Delete one of those 2 walls. + if (wall[i].point2 == wall[i + 1].point2) + { + wall[i].nextwall = -1; + wall[i].nextsector = -1; + wall[i].point2 = i; + } + } + // validate 'nextsector' fields. Some maps have these wrong which can cause render glitches and occasionally even crashes. for (auto& wal : walls()) {