]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
make view kicks (both angle and origin) occur before gun is oriented, so it follows...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 31 Oct 2002 15:17:40 +0000 (15:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 31 Oct 2002 15:17:40 +0000 (15:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2592 d7cf8633-e32d-0410-b094-e92efae38249

view.c

diff --git a/view.c b/view.c
index e6a66a0353d7c4e7faaae50647211796a2b4e57c..4b46ffc44709a28701bda82d9b45979eb0dfacf5 100644 (file)
--- 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;