From ae4f6776d9dd92d0a506cc587c8ac8aff4361fb4 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 2 May 2010 14:09:34 +0000 Subject: [PATCH] attempted fix for teleports From: Rudolf Polzer git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10157 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=45329bdb67e6117291abc09cbedeb64bf1a06238 --- view.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/view.c b/view.c index 28f19b6f..13ac722e 100644 --- a/view.c +++ b/view.c @@ -595,7 +595,16 @@ void V_CalcRefdef (void) // 1. if we teleported, clear the frametime... the lowpass will recover the previous value then if(!ent->persistent.trail_allowed) // FIXME improve this check + { + // try to fix the first highpass; result is NOT + // perfect! TODO find a better fix + VectorCopy(cl.viewangles, cl.gunangles_highpass); + VectorCopy(cl.movement_origin, cl.gunorg_highpass); + // prevent further CHANGES caused by the high/lowpasses + // - a highpass will return the diff, a lowpass will + // return the saved value; note: the first diff will be 0! frametime = 0; + } // 2. for the gun origin, only keep the high frequency (non-DC) parts, which is "somewhat like velocity" highpass3_limited(cl.movement_origin, frametime*cl_followmodel_side_highpass1.value, cl_followmodel_side_limit.value, frametime*cl_followmodel_side_highpass1.value, cl_followmodel_side_limit.value, frametime*cl_followmodel_up_highpass1.value, cl_followmodel_up_limit.value, cl.gunorg_highpass, gunorg); -- 2.39.2