From a4a121694c270b11a8c846b5d5ce71d15e8f0d58 Mon Sep 17 00:00:00 2001 From: EvilSpirit Date: Mon, 4 Jul 2016 13:57:46 +0600 Subject: [PATCH] Reimplement commit 0b999f4 correctly. --- src/mesh.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesh.cpp b/src/mesh.cpp index f4d18ccf..65381860 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -1042,7 +1042,10 @@ void SKdNode::MakeOutlinesInto(SOutlineList *sol) const } bool SOutline::IsVisible(Vector projDir) const { - return (nl.Dot(projDir) > LENGTH_EPS) == (nr.Dot(projDir) < LENGTH_EPS); + double ldot = nl.Dot(projDir); + double rdot = nr.Dot(projDir); + return (ldot > -LENGTH_EPS) == (rdot < LENGTH_EPS) || + (rdot > -LENGTH_EPS) == (ldot < LENGTH_EPS); } void SOutlineList::Clear() {