]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
remove some unfounded warnings of some gcc versions :P
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 3 Aug 2009 16:02:59 +0000 (16:02 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 3 Aug 2009 16:02:59 +0000 (16:02 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9086 d7cf8633-e32d-0410-b094-e92efae38249

cl_collision.c
sv_phys.c

index e9788fa52444ca58f9a981e418cad4fa770e6709..140e0e681e61554e6054e70e0d4c29a62492809e 100644 (file)
@@ -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))
        {
index d9cb5e6b06e556985fcf48f27276bd6760ff37f3..355599d3613aebc2f0b24363614bfe64e94ef806 100644 (file)
--- 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))
        {