]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
trying to improve terrain collision brush issues in q3bsp
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 31 Jul 2006 13:57:42 +0000 (13:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 31 Jul 2006 13:57:42 +0000 (13:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6539 d7cf8633-e32d-0410-b094-e92efae38249

collision.c

index ca95a54b1487eb45f916811bc0c095c3f13b4cf8..41083f74aba52869ccab283446f2760350708d48 100644 (file)
@@ -2,8 +2,9 @@
 #include "quakedef.h"
 #include "polygon.h"
 
-#define COLLISION_SNAPSCALE (32.0f)
+#define COLLISION_SNAPSCALE (64.0f)
 #define COLLISION_SNAP (1.0f / COLLISION_SNAPSCALE)
+#define COLLISION_SNAP2 (2.0f / COLLISION_SNAPSCALE)
 #define COLLISION_PLANE_DIST_EPSILON (1.0f / 32.0f)
 
 cvar_t collision_impactnudge = {0, "collision_impactnudge", "0.03125", "how much to back off from the impact"};
@@ -237,7 +238,7 @@ colbrushf_t *Collision_NewBrushFromPlanes(mempool_t *mempool, int numoriginalpla
                {
                        // check if there is already a matching point (no duplicates)
                        for (m = 0;m < numpointsbuf;m++)
-                               if (VectorDistance2(&p[w][k*3], pointsbuf[m].v) < COLLISION_SNAP)
+                               if (VectorDistance2(&p[w][k*3], pointsbuf[m].v) < COLLISION_SNAP2)
                                        break;
 
                        // if there is no match, add a new one