From 6ae5813fbbeca23f261d75cbe63c3704830400f6 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 16 Aug 2009 17:06:34 +0000 Subject: [PATCH] fix pitchsign warnings in dev-c++ git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9118 d7cf8633-e32d-0410-b094-e92efae38249 --- clvm_cmds.c | 3 +-- sv_phys.c | 4 ++-- svvm_cmds.c | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/clvm_cmds.c b/clvm_cmds.c index 11277881..43415228 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -2223,7 +2223,7 @@ void CL_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatri { prvm_eval_t *val; float scale; - float pitchsign; + float pitchsign = 1; dp_model_t *model; scale = 1; @@ -2236,7 +2236,6 @@ void CL_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatri Matrix4x4_CreateFromQuakeEntity(out, cl.csqc_origin[0], cl.csqc_origin[1], cl.csqc_origin[2], cl.csqc_angles[0], cl.csqc_angles[1], cl.csqc_angles[2], scale * cl_viewmodel_scale.value); else { - pitchsign = 1; if ((model = CL_GetModelFromEdict(ent)) && model->type == mod_alias) pitchsign = -1; Matrix4x4_CreateFromQuakeEntity(out, ent->fields.client->origin[0], ent->fields.client->origin[1], ent->fields.client->origin[2], pitchsign * ent->fields.client->angles[0], ent->fields.client->angles[1], ent->fields.client->angles[2], scale); diff --git a/sv_phys.c b/sv_phys.c index 355599d3..abd60055 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -99,7 +99,7 @@ trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t hullmins, hullmaxs; int i, bodysupercontents; int passedictprog; - float pitchsign; + float pitchsign = 1; qboolean pointtrace; prvm_edict_t *traceowner, *touch; trace_t trace; @@ -241,7 +241,7 @@ trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const // if the modelindex is 0, it shouldn't be SOLID_BSP! if (modelindex > 0 && modelindex < MAX_MODELS) model = sv.models[(int)touch->fields.server->modelindex]; - pitchsign = 1; + //pitchsign = 1; if ( ((modelindex = (int)touch->fields.server->modelindex) >= 1 && modelindex < MAX_MODELS && (model = sv.models[(int)touch->fields.server->modelindex])) ? diff --git a/svvm_cmds.c b/svvm_cmds.c index f870319a..6fde46d7 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -2615,7 +2615,7 @@ void SV_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatri { prvm_eval_t *val; float scale; - float pitchsign; + float pitchsign = 1; int modelindex; dp_model_t *model; @@ -2628,7 +2628,6 @@ void SV_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatri Matrix4x4_CreateFromQuakeEntity(out, ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2] + ent->fields.server->view_ofs[2], ent->fields.server->v_angle[0], ent->fields.server->v_angle[1], ent->fields.server->v_angle[2], scale * cl_viewmodel_scale.value); else { - pitchsign = 1; if ( ((modelindex = (int)ent->fields.server->modelindex) >= 1 && modelindex < MAX_MODELS && (model = sv.models[(int)ent->fields.server->modelindex])) ? -- 2.39.2