From 2bb7d09265f66769e60fcbe5406bb2b6e7c61f3f Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 31 Jul 2006 13:57:42 +0000 Subject: [PATCH] trying to improve terrain collision brush issues in q3bsp git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6539 d7cf8633-e32d-0410-b094-e92efae38249 --- collision.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collision.c b/collision.c index ca95a54b..41083f74 100644 --- a/collision.c +++ b/collision.c @@ -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 -- 2.39.2