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 44ae46f..b539b5b 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);