From: Mario Date: Sun, 12 Jun 2016 10:54:05 +0000 (+1000) Subject: Revert rollkill fix (breaks warpzones) X-Git-Tag: xonotic-v0.8.2~815 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c9a5b65c75436215b55726d111501734ee4506bb;p=xonotic%2Fxonotic-data.pk3dir.git Revert rollkill fix (breaks warpzones) --- diff --git a/qcsrc/lib/warpzone/client.qc b/qcsrc/lib/warpzone/client.qc index 44ae46fb1..b539b5bcc 100644 --- a/qcsrc/lib/warpzone/client.qc +++ b/qcsrc/lib/warpzone/client.qc @@ -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);