From: Samual Lenks Date: Wed, 4 Sep 2013 00:28:11 +0000 (-0400) Subject: Fix velocity zoom during intermission X-Git-Tag: xonotic-v0.8.0~349 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cd6fe9cfa508a68cebbe33c5a457e26102342cc5;p=xonotic%2Fxonotic-data.pk3dir.git Fix velocity zoom during intermission --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 55329d464..46920a417 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -166,15 +166,19 @@ vector GetCurrentFov(float fov) if(autocvar_cl_velocityzoom && autocvar_cl_velocityzoom_type) // _type = 0 disables velocity zoom too { - v = pmove_vel; - if(csqcplayer) - v = csqcplayer.velocity; - - switch(autocvar_cl_velocityzoom_type) + if(intermission) { curspeed = 0; } + else { - case 3: curspeed = max(0, v_forward * v); break; - case 2: curspeed = (v_forward * v); break; - case 1: default: curspeed = vlen(v); break; + v = pmove_vel; + if(csqcplayer) + v = csqcplayer.velocity; + + switch(autocvar_cl_velocityzoom_type) + { + case 3: curspeed = max(0, v_forward * v); break; + case 2: curspeed = (v_forward * v); break; + case 1: default: curspeed = vlen(v); break; + } } velocityzoom = bound(0, drawframetime / max(0.000000001, autocvar_cl_velocityzoom_time), 1); // speed at which the zoom adapts to player velocity