From: havoc Date: Mon, 31 Jul 2006 18:39:19 +0000 (+0000) Subject: more tweaks trying to improve precision on q3map2-compiled terrain models in q3bsp X-Git-Tag: xonotic-v0.1.0preview~3843 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5b7ad43049de22dd99890c2f449ea0c096da75e0;p=xonotic%2Fdarkplaces.git more tweaks trying to improve precision on q3map2-compiled terrain models in q3bsp git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6540 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/collision.c b/collision.c index 41083f74..12080964 100644 --- a/collision.c +++ b/collision.c @@ -2,10 +2,10 @@ #include "quakedef.h" #include "polygon.h" -#define COLLISION_SNAPSCALE (64.0f) +#define COLLISION_SNAPSCALE (32.0f) #define COLLISION_SNAP (1.0f / COLLISION_SNAPSCALE) #define COLLISION_SNAP2 (2.0f / COLLISION_SNAPSCALE) -#define COLLISION_PLANE_DIST_EPSILON (1.0f / 32.0f) +#define COLLISION_PLANE_DIST_EPSILON (2.0f / COLLISION_SNAPSCALE) cvar_t collision_impactnudge = {0, "collision_impactnudge", "0.03125", "how much to back off from the impact"}; cvar_t collision_startnudge = {0, "collision_startnudge", "0", "how much to bias collision trace start"}; @@ -189,6 +189,8 @@ colbrushf_t *Collision_NewBrushFromPlanes(mempool_t *mempool, int numoriginalpla // clip it by all other planes for (k = 0;k < numoriginalplanes && pnumpoints && pnumpoints <= pmaxpoints;k++) { + // skip the plane this polygon + // (nothing happens if it is processed, this is just an optimization) if (k != j) { // we want to keep the inside of the brush plane so we flip