From 38454f0f53e0fbe2c1dca6e32426fe360cddc26b Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 2 May 2010 14:06:49 +0000 Subject: [PATCH] try to fix the gun origin for view bobbing From: Rudolf Polzer git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10141 d7cf8633-e32d-0410-b094-e92efae38249 --- view.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/view.c b/view.c index de4c3631..685957dc 100644 --- a/view.c +++ b/view.c @@ -620,6 +620,13 @@ void V_CalcRefdef (void) bob = xyspeed * cl_bob.value; bob = bob*0.3 + bob*0.7*cycle; vieworg[2] += bound(-7, bob, 4); + // we also need to adjust gunorg, or this appears like + // pushing the gun! In the old code, this was applied + // to vieworg BEFORE copying to gunorg, but this is not + // viable with the new followmodel code as that would + // mean that followmodel would work on the + // munged-by-bob vieworg and do feedback + gunorg[2] += bound(-7, bob, 4); } if (cl_bob.value && cl_bobmodel.value) -- 2.39.2