From 3a237df932bf2f895e9a026f72cd155e70ae3c3d Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Tue, 30 Jun 2020 05:10:51 +0000 Subject: [PATCH] Fix remaining warnings git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12758 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 4 ++-- view.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/r_shadow.c b/r_shadow.c index 65955f50..a34af2c8 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -1757,8 +1757,8 @@ static void R_Shadow_BounceGrid_UpdateSpacing(void) int resolution[3]; int numpixels; vec3_t ispacing; - vec3_t maxs; - vec3_t mins; + vec3_t maxs = {0,0,0}; + vec3_t mins = {0,0,0}; vec3_t size; vec3_t spacing; r_shadow_bouncegrid_settings_t *settings = &r_shadow_bouncegrid_state.settings; diff --git a/view.c b/view.c index 5683ff09..8f9b9bf9 100644 --- a/view.c +++ b/view.c @@ -696,7 +696,7 @@ void V_CalcRefdefUsing (const matrix4x4_t *entrendermatrix, const vec3_t clviewa if (!cldead) { double xyspeed, bob, bobfall; - double cycle; // double-precision because cl.time can be a very large number, where float would get stuttery at high time values + double bobcycle = 0, cycle; // double-precision because cl.time can be a very large number, where float would get stuttery at high time values vec_t frametime; frametime = (cl.time - cl.calcrefdef_prevtime) * cl.movevars_timescale; @@ -793,9 +793,9 @@ void V_CalcRefdefUsing (const matrix4x4_t *entrendermatrix, const vec3_t clviewa cycle = cl.time / cl_bobcycle.value; cycle -= (int) cycle; if (cycle < cl_bobup.value) - cycle = sin(M_PI * cycle / cl_bobup.value); + bobcycle = cycle = sin(M_PI * cycle / cl_bobup.value); else - cycle = sin(M_PI + M_PI * (cycle-cl_bobup.value)/(1.0 - cl_bobup.value)); + bobcycle = cycle = sin(M_PI + M_PI * (cycle-cl_bobup.value)/(1.0 - cl_bobup.value)); // bob is proportional to velocity in the xy plane // (don't count Z, or jumping messes it up) bob = xyspeed * cl_bob.value; @@ -919,7 +919,7 @@ void V_CalcRefdefUsing (const matrix4x4_t *entrendermatrix, const vec3_t clviewa bob = bspeed * cl_bobmodel_up.value * cl_viewmodel_scale.value * cos (s * 2) * t; VectorMA (gunorg, bob, up, gunorg); // Classic Quake bobbing - bob = (cl_bobmodel_classic.integer ? xyspeed * cl_bob.value * 0.25 * cycle : bspeed * cl_bobmodel_forward.value * cos(s * 2) * t) * cl_viewmodel_scale.value; + bob = (cl_bobmodel_classic.integer ? xyspeed * cl_bob.value * 0.25 * bobcycle : bspeed * cl_bobmodel_forward.value * cos(s * 2) * t) * cl_viewmodel_scale.value; VectorMA (gunorg, (cl_bobmodel_classic.integer ? (bob > 1 ? 1 : bob) : bob), forward, gunorg); } } -- 2.39.2