]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert rollkill fix (breaks warpzones)
authorMario <mario@smbclan.net>
Sun, 12 Jun 2016 10:54:05 +0000 (20:54 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Jun 2016 10:54:05 +0000 (20:54 +1000)
qcsrc/lib/warpzone/client.qc

index 44ae46fb14b08bcb0a63137a359c551e4b23491c..b539b5bcc33355c169838877313981427139f5a6 100644 (file)
@@ -256,21 +256,17 @@ void WarpZone_FixView()
                WarpZone_View_Outside();
 
 #ifndef KEEP_ROLL
-       static float rollkill;
-       if (STAT(HEALTH) <= 0 && STAT(HEALTH) != -666 && STAT(HEALTH) != -2342)
-       {
-               if(autocvar_cl_rollkillspeed)
-               {
-                       rollkill += frametime * autocvar_cl_rollkillspeed;
-                       rollkill = min(1, rollkill);
-               }
-               float rick;
-               rick = getproperty(VF_CL_VIEWANGLES_Z) * rollkill;
-               setproperty(VF_CL_VIEWANGLES_Z, rick);
-               ang.z *= rollkill;
-       }
-       else if(rollkill)
-               rollkill = 0;
+       float rick;
+       float f;
+       if(autocvar_cl_rollkillspeed)
+               f = max(0, (1 - frametime * autocvar_cl_rollkillspeed));
+       else
+               f = 0;
+
+       rick = getproperty(VF_CL_VIEWANGLES_Z);
+       rick *= f;
+       setproperty(VF_CL_VIEWANGLES_Z, rick);
+       ang.z *= f;
 #endif
 
        setproperty(VF_ORIGIN, org);