set some possibly uninitialised vars to zero

This commit is contained in:
Jonathan Gray 2013-05-02 13:46:58 +10:00
parent 2a6c6cf358
commit a3d6db9f5d
4 changed files with 15 additions and 5 deletions

View file

@ -1050,8 +1050,8 @@ int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, int area2
float length, ground_bestlength, water_bestlength, ground_bestdist, water_bestdist;
vec3_t v1, v2, v3, v4, tmpv, p1area1, p1area2, p2area1, p2area2;
vec3_t normal, ort, edgevec, start, end, dir;
vec3_t ground_beststart, ground_bestend, ground_bestnormal;
vec3_t water_beststart, water_bestend, water_bestnormal;
vec3_t ground_beststart = {0, 0, 0}, ground_bestend = {0, 0, 0}, ground_bestnormal = {0, 0, 0};
vec3_t water_beststart = {0, 0, 0}, water_bestend = {0, 0, 0}, water_bestnormal = {0, 0, 0};
vec3_t invgravity = {0, 0, 1};
vec3_t testpoint;
aas_plane_t *plane;
@ -2368,7 +2368,7 @@ int AAS_Reachability_Ladder(int area1num, int area2num)
float face1area, face2area, bestface1area, bestface2area;
float phys_jumpvel, maxjumpheight;
vec3_t area1point, area2point, v1, v2, up = {0, 0, 1};
vec3_t mid, lowestpoint, start, end, sharededgevec, dir;
vec3_t mid, lowestpoint = {0, 0}, start, end, sharededgevec, dir;
aas_area_t *area1, *area2;
aas_face_t *face1, *face2, *ladderface1, *ladderface2;
aas_plane_t *plane1, *plane2;

View file

@ -832,6 +832,11 @@ qboolean CROFFSystem::ApplyROFF( SROFFEntity *roff_ent, CROFFSystem::CROFF *roff
origin = originTemp;
VM_Call( cgvm, CG_GET_ANGLES, roff_ent->mEntID, angleTemp );
angle = angleTemp;
#else
originTrajectory = NULL;
angleTrajectory = NULL;
origin = NULL;
angle = NULL;
#endif
}
else
@ -978,6 +983,11 @@ qboolean CROFFSystem::ClearLerp( SROFFEntity *roff_ent )
origin = originTemp;
VM_Call( cgvm, CG_GET_ANGLES, roff_ent->mEntID, angleTemp );
angle = angleTemp;
#else
originTrajectory = NULL;
angleTrajectory = NULL;
origin = NULL;
angle = NULL;
#endif
}
else

View file

@ -1395,7 +1395,7 @@ void CM_TraceThroughPatchCollide( traceWork_t *tw, trace_t &trace, const struct
float offset, enterFrac, leaveFrac, t;
patchPlane_t *planes;
facet_t *facet;
float plane[4], bestplane[4];
float plane[4], bestplane[4] = {0, 0, 0, 0};
vec3_t startp, endp;
#ifndef BSPC
static cvar_t *cv;

View file

@ -210,7 +210,7 @@ static void R_LoadLightmaps( lump_t *l, const char *psMapName, world_t &worldDat
float g = buf_p[j*3+1];
float b = buf_p[j*3+2];
float intensity;
float out[3];
float out[3] = {0, 0, 0};
intensity = 0.33f * r + 0.685f * g + 0.063f * b;