From 84d547adfbd958d9b5afb45c643971d374eb9918 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 29 Mar 2016 13:10:15 +0200 Subject: [PATCH] - fixed: The check if a line is in range of a bounding box must be exclusive. Unfortunately I picked the one incorrect version of this check (from A_PainShootSkull) when moving it to an inline function. --- src/r_defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/r_defs.h b/src/r_defs.h index d7087412b..fca40e8ef 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -1604,10 +1604,10 @@ inline void AActor::ClearInterpolation() inline bool FBoundingBox::inRange(const line_t *ld) const { - return (!(Left() > ld->bbox[BOXRIGHT] || - Right() < ld->bbox[BOXLEFT] || - Top() < ld->bbox[BOXBOTTOM] || - Bottom() > ld->bbox[BOXTOP])); + return Left() < ld->bbox[BOXRIGHT] && + Right() > ld->bbox[BOXLEFT] && + Top() > ld->bbox[BOXBOTTOM] && + Bottom() < ld->bbox[BOXTOP]; }