From 96b3408dbd8ce9675c92140e69551b9dc5f7dbc9 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 31 Aug 2014 11:15:19 +0000 Subject: [PATCH] Mapster32: demote wall check "corruptions" introduced in r4569 to level 2. The winding of a loop -- with clockdir() -- is determined by examining the two line segments spanned between the points following a leftmost point of the loop. If the loop contains a leftmost point that belongs to the "right" side (as can happen with sliding door constructions), there's a chance that an outer loop is misclassified. git-svn-id: https://svn.eduke32.com/eduke32@4580 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 4 ++-- polymer/eduke32/source/m32common.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 182fec3e4..1e9885e86 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -8478,9 +8478,9 @@ int32_t clockdir(int32_t wallstart) x2 = POINT2(wall[themin].point2).x; y2 = POINT2(wall[themin].point2).y; - if (y1 >= y2 && y1 <= y0) + if (y2 <= y1 && y1 <= y0) return CLOCKDIR_CW; - if (y1 >= y0 && y1 <= y2) + if (y0 <= y1 && y1 <= y2) return CLOCKDIR_CCW; tempint = (x0-x1)*(y2-y1) - (x2-x1)*(y0-y1); diff --git a/polymer/eduke32/source/m32common.c b/polymer/eduke32/source/m32common.c index 2685284c1..37f2a2908 100644 --- a/polymer/eduke32/source/m32common.c +++ b/polymer/eduke32/source/m32common.c @@ -1255,9 +1255,9 @@ int32_t CheckMapCorruption(int32_t printfromlev, uint64_t tryfixing) const int32_t outerloopstart = determine_outer_loop(i); if (outerloopstart == -1) - CORRUPTCHK_PRINT(4, CORRUPT_SECTOR|i, "SECTOR %d contains no outer (clockwise) loop", i); + CORRUPTCHK_PRINT(2, CORRUPT_SECTOR|i, "SECTOR %d contains no outer (clockwise) loop", i); else if (outerloopstart == -2) - CORRUPTCHK_PRINT(3, CORRUPT_SECTOR|i, "SECTOR %d contains more than one outer (clockwise) loops", i); + CORRUPTCHK_PRINT(2, CORRUPT_SECTOR|i, "SECTOR %d contains more than one outer (clockwise) loops", i); # if CCHK_LOOP_CHECKS >= 2 else {