From: havoc Date: Thu, 31 Oct 2002 15:17:40 +0000 (+0000) Subject: make view kicks (both angle and origin) occur before gun is oriented, so it follows... X-Git-Tag: RELEASE_0_2_0_RC1~92 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3e7c8230f34c2dd6252e26d595b42b73b9f8dd4c;p=xonotic%2Fdarkplaces.git make view kicks (both angle and origin) occur before gun is oriented, so it follows the view exactly git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2592 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/view.c b/view.c index e6a66a03..4b46ffc4 100644 --- a/view.c +++ b/view.c @@ -532,6 +532,13 @@ void V_CalcRefdef (void) r_refdef.vieworg[2] += cl.viewheight + bob; + // LordHavoc: origin view kick added + if (!intimerefresh) + { + VectorAdd(r_refdef.viewangles, cl.punchangle, r_refdef.viewangles); + VectorAdd(r_refdef.vieworg, cl.punchvector, r_refdef.vieworg); + } + // set up gun // (FIXME! this should be in cl_main.c with the other linking code, not view.c!) view->state_current.modelindex = cl.stats[STAT_WEAPON]; @@ -551,13 +558,6 @@ void V_CalcRefdef (void) view->render.effects = ent->render.effects; view->render.scale = 1.0 / 3.0; - // LordHavoc: origin view kick added - if (!intimerefresh) - { - VectorAdd(r_refdef.viewangles, cl.punchangle, r_refdef.viewangles); - VectorAdd(r_refdef.vieworg, cl.punchvector, r_refdef.vieworg); - } - // link into render entities list if (r_refdef.numentities < r_refdef.maxentities && r_drawviewmodel.integer && !chase_active.integer && !envmap && r_drawentities.integer && !(cl.items & IT_INVISIBILITY) && cl.stats[STAT_HEALTH] > 0 && view->render.model != NULL) r_refdef.entities[r_refdef.numentities++] = &view->render;