From 63f394cbc3713c4963fc969bf8b79fefc085c2b8 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 30 May 2010 07:34:52 +0000 Subject: [PATCH] another intersect fix git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5113 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/weapon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 813a35f1..f253addb 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -239,7 +239,7 @@ static inline bool intersectcylinder(const vec &from, const vec &to, const vec & { if(nd <= 0) return false; float cdist = -md / nd; - if(k + dist*(2*mn + cdist*nn) <= 0) dist = cdist; + if(k + cdist*(2*mn + cdist*nn) <= 0) dist = cdist; else if(c <= 0) return false; } else if(offset > dd)