From: tomaz Date: Wed, 18 Aug 2004 22:22:29 +0000 (+0000) Subject: Fixed collision: client getting fraction out of bounds errors when in a map the clien... X-Git-Tag: xonotic-v0.1.0preview~5741 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=304f700ebc2837534f108cf2051d3f6224fec8af;p=xonotic%2Fdarkplaces.git Fixed collision: client getting fraction out of bounds errors when in a map the client does not have git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4336 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_collision.c b/cl_collision.c index 486e8751..3ade5bcf 100644 --- a/cl_collision.c +++ b/cl_collision.c @@ -41,6 +41,11 @@ float CL_TraceLine(const vec3_t start, const vec3_t end, vec3_t impact, vec3_t n matrix4x4_t matrix, imatrix; float tempnormal[3], starttransformed[3], endtransformed[3]; + memset (&trace, 0 , sizeof(trace_t)); + trace.fraction = 1; + trace.realfraction = 1; + VectorCopy (end, trace.endpos); + if (hitent) *hitent = &cl_entities[0].render; Mod_CheckLoaded(cl.worldmodel);