set some possibly uninitialised vars to zero

This commit is contained in:
Jonathan Gray 2013-05-02 17:45:27 +10:00
parent 89e2c9f708
commit 6bc56bd6b6
5 changed files with 17 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

@ -810,6 +810,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
@ -952,6 +957,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

@ -1466,7 +1466,7 @@ void CM_TraceThroughPatchCollide( traceWork_t *tw, const struct patchCollide_s *
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

@ -201,7 +201,7 @@ static void R_LoadLightmaps( lump_t *l, const char *psMapName ) {
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;

View file

@ -870,6 +870,8 @@ void RB_CalcFogTexCoords( float *st ) {
eyeT = DotProduct( backEnd.ori.viewOrigin, fogDepthVector ) + fogDepthVector[3];
} else {
eyeT = 1; // non-surface fog always has eye inside
fogDepthVector[0] = fogDepthVector[1] = fogDepthVector[2] = 0.0f;
fogDepthVector[3] = 1.0f;
}
// see if the viewpoint is outside