From 3923039a1bbda2f910ba7af11a74b79b514ac623 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 7 Apr 2016 01:16:07 +0200 Subject: [PATCH] - fixed: a sight check that starts right on a linedef should ignore that linedef. Trying to calculate a slope to the target from this linedef's opening will always result in failure because it'd involve a division by zero. --- src/p_sight.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p_sight.cpp b/src/p_sight.cpp index f8d2043fd..847448185 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -216,6 +216,9 @@ bool SightCheck::PTR_SightTraverse (intercept_t *in) if (open.range == 0 && open.portalflags == 0 && (lport == NULL || lport->mType != PORTT_LINKED)) // quick test for totally closed doors (must be delayed if portal checks are needed, though) return false; // stop + if (in->frac == 0) + return true; + // check bottom if (open.bottom > LINEOPEN_MIN) {