From 145be4b7f63608b1b43cdae981761cc74c34efa0 Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 3 Aug 2009 16:02:59 +0000 Subject: [PATCH] remove some unfounded warnings of some gcc versions :P git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9086 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_collision.c | 6 ++++-- sv_phys.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cl_collision.c b/cl_collision.c index e9788fa5..140e0e68 100644 --- a/cl_collision.c +++ b/cl_collision.c @@ -16,7 +16,7 @@ float CL_SelectTraceLine(const vec3_t start, const vec3_t end, vec3_t impact, ve float tempnormal[3], starttransformed[3], endtransformed[3]; #ifdef COLLISION_STUPID_TRACE_ENDPOS_IN_SOLID_WORKAROUND vec3_t end; - vec_t len; + vec_t len = 0; if(!VectorCompare(start, pEnd)) { @@ -71,8 +71,10 @@ float CL_SelectTraceLine(const vec3_t start, const vec3_t end, vec3_t impact, ve Matrix4x4_Transform(&ent->inversematrix, start, starttransformed); Matrix4x4_Transform(&ent->inversematrix, end, endtransformed); Collision_ClipTrace_Box(&trace, ent->model->normalmins, ent->model->normalmaxs, starttransformed, vec3_origin, vec3_origin, endtransformed, SUPERCONTENTS_SOLID, SUPERCONTENTS_SOLID, 0, NULL); +#ifdef COLLISION_STUPID_TRACE_ENDPOS_IN_SOLID_WORKAROUND if(!VectorCompare(start, pEnd)) Collision_ShortenTrace(&trace, len / (len + 1), pEnd); +#endif if (maxrealfrac < trace.realfraction) continue; @@ -255,7 +257,7 @@ trace_t CL_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const prvm_edict_t *touchedicts[MAX_EDICTS]; #ifdef COLLISION_STUPID_TRACE_ENDPOS_IN_SOLID_WORKAROUND vec3_t end; - vec_t len; + vec_t len = 0; if(!VectorCompare(start, pEnd)) { diff --git a/sv_phys.c b/sv_phys.c index d9cb5e6b..355599d3 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -122,7 +122,7 @@ trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const prvm_edict_t *touchedicts[MAX_EDICTS]; #ifdef COLLISION_STUPID_TRACE_ENDPOS_IN_SOLID_WORKAROUND vec3_t end; - vec_t len; + vec_t len = 0; if(!VectorCompare(start, pEnd)) { -- 2.39.2