From: havoc Date: Sun, 23 Apr 2017 22:20:45 +0000 (+0000) Subject: Fix a bug in collisions between brushes and brushes when the plane is rotating -... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=220d6cb7e084a11a1c8f99b0fd57c522e17d6cef;p=xonotic%2Fdarkplaces.git Fix a bug in collisions between brushes and brushes when the plane is rotating - this case is never used currently but it's definitely a bug worth fixing. Thanks to Eduard Elin for the bug report. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12331 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/collision.c b/collision.c index 827200ef..c9cfc976 100644 --- a/collision.c +++ b/collision.c @@ -646,7 +646,7 @@ void Collision_TraceBrushBrushFloat(trace_t *trace, const colbrushf_t *trace_sta VectorNormalize(endplane); } startplane[3] = furthestplanedist_float(startplane, other_start->points, othernumpoints); - endplane[3] = furthestplanedist_float(startplane, other_end->points, othernumpoints); + endplane[3] = furthestplanedist_float(endplane, other_end->points, othernumpoints); startdist = nearestplanedist_float(startplane, trace_start->points, tracenumpoints) - startplane[3]; enddist = nearestplanedist_float(endplane, trace_end->points, tracenumpoints) - endplane[3]; //Con_Printf("%c%i: startdist = %f, enddist = %f, startdist / (startdist - enddist) = %f\n", nplane2 != nplane ? 'b' : 'a', nplane2, startdist, enddist, startdist / (startdist - enddist));