set some possibly uninitialised vars to zero

This commit is contained in:
Jonathan Gray 2013-05-02 00:52:09 +10:00
parent 1a47ca7601
commit 42dd32771a
7 changed files with 9 additions and 7 deletions

View file

@ -1948,7 +1948,7 @@ void CPoly::Rotate()
//----------------------------
bool CPoly::Update()
{
vec3_t mOldOrigin;
vec3_t mOldOrigin = {0, 0, 0};
//FIXME: Handle Relative and Bolted Effects
/*

View file

@ -1739,7 +1739,7 @@ static qboolean CG_CheckLookTarget( centity_t *cent, vec3_t lookAngles, float *l
//Now calc head angle to lookTarget, if any
if ( cent->gent->client->renderInfo.lookTarget >= 0 && cent->gent->client->renderInfo.lookTarget < ENTITYNUM_WORLD )
{
vec3_t lookDir, lookOrg, eyeOrg;
vec3_t lookDir, lookOrg = {0, 0, 0}, eyeOrg;
if ( cent->gent->client->renderInfo.lookMode == LM_ENT )
{
centity_t *lookCent = &cg_entities[cent->gent->client->renderInfo.lookTarget];

View file

@ -373,7 +373,7 @@ saberMoveName_t transitionMove[Q_NUM_QUADS][Q_NUM_QUADS] =
void PM_VelocityForSaberMove( playerState_t *ps, vec3_t throwDir )
{
vec3_t vForward, vRight, vUp, startQ, endQ;
vec3_t vForward, vRight, vUp, startQ = {0, 0, 0}, endQ = {0, 0, 0};
AngleVectors( ps->viewangles, vForward, vRight, vUp );

View file

@ -3259,7 +3259,7 @@ qboolean WP_LobFire( gentity_t *self, vec3_t start, vec3_t target, vec3_t mins,
//---------------------------------------------------------
{
float targetDist, shotSpeed, speedInc = 100, travelTime, impactDist, bestImpactDist = Q3_INFINITE;//fireSpeed,
vec3_t targetDir, shotVel, failCase;
vec3_t targetDir, shotVel, failCase = {0, 0, 0};
trace_t trace;
trajectory_t tr;
qboolean blocked;
@ -5354,4 +5354,4 @@ void SP_misc_weapon_shooter( gentity_t *self )
{
self->wait = 500;
}
}
}

View file

@ -2497,7 +2497,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

@ -1273,6 +1273,8 @@ try
int msec, minMsec;
static int lastTime;
timeBeforeFirstEvents = timeBeforeServer = timeBeforeEvents = timeBeforeClient = 0;
// write config file if anything changed
#ifndef _XBOX
Com_WriteConfiguration();

View file

@ -215,7 +215,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;