]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
attempted fix for teleports
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 May 2010 14:09:34 +0000 (14:09 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 May 2010 14:09:34 +0000 (14:09 +0000)
From: Rudolf Polzer <divverent@alientrap.org>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10157 d7cf8633-e32d-0410-b094-e92efae38249

view.c

diff --git a/view.c b/view.c
index 28f19b6f7df2b874b12b9230d2a161496a9f39c7..13ac722ee68b472c6070fd37a977f7fc3414df8d 100644 (file)
--- 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);