From: havoc Date: Tue, 13 May 2014 22:13:15 +0000 (+0000) Subject: Changed the collision code used by sv_gameplayfix_nudgeoutofsolid to not consider... X-Git-Tag: xonotic-v0.8.1~29^2~84 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=89983a6142ccbec1cfd3690fa55979bbdaf3b8f1;p=xonotic%2Fdarkplaces.git Changed the collision code used by sv_gameplayfix_nudgeoutofsolid to not consider collision_impactnudge as that is already taken care of by the caller, and the way it was being done would typically reject such collisions anyway. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12076 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/collision.c b/collision.c index 11e4a865..2c4cec65 100644 --- a/collision.c +++ b/collision.c @@ -649,7 +649,7 @@ void Collision_TraceBrushBrushFloat(trace_t *trace, const colbrushf_t *trace_sta //Con_Printf("%c%i: startdist = %f, enddist = %f, startdist / (startdist - enddist) = %f\n", nplane2 != nplane ? 'b' : 'a', nplane2, startdist, enddist, startdist / (startdist - enddist)); // aside from collisions, this is also used for error correction - if (startdist <= collision_impactnudge.value && nplane < numplanes1 && (startdepth < startdist || startdepth == 1)) + if (startdist <= 0.0f && nplane < numplanes1 && (startdepth < startdist || startdepth == 1)) { startdepth = startdist; VectorCopy(startplane, startdepthnormal); @@ -814,7 +814,7 @@ void Collision_TraceLineBrushFloat(trace_t *trace, const vec3_t linestart, const //Con_Printf("%c%i: startdist = %f, enddist = %f, startdist / (startdist - enddist) = %f\n", nplane2 != nplane ? 'b' : 'a', nplane2, startdist, enddist, startdist / (startdist - enddist)); // aside from collisions, this is also used for error correction - if (startdist < collision_impactnudge.value && (startdepth < startdist || startdepth == 1)) + if (startdist <= 0.0f && (startdepth < startdist || startdepth == 1)) { startdepth = startdist; VectorCopy(startplane, startdepthnormal);