]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix a bug in collisions between brushes and brushes when the plane is rotating -...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Apr 2017 22:20:45 +0000 (22:20 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Mon, 24 Apr 2017 00:58:36 +0000 (02:58 +0200)
Thanks to Eduard Elin for the bug report.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12331 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=220d6cb7e084a11a1c8f99b0fd57c522e17d6cef

collision.c

index 827200efa4c8e21c0c1ff4c20193ad3fdbd44403..c9cfc976ebb6760d1c56bcf43fdcf9f143fd4e23 100644 (file)
@@ -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));