]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Stuff and things
authorSamual Lenks <samual@xonotic.org>
Fri, 8 Feb 2013 01:03:10 +0000 (20:03 -0500)
committerSamual Lenks <samual@xonotic.org>
Fri, 8 Feb 2013 01:03:10 +0000 (20:03 -0500)
qcsrc/client/View.qc

index 117de38c496108d24874d35130917cdf5477a591..f023ab23a3f80d1bb922a045cd9fdc7b7024dc90 100644 (file)
@@ -107,10 +107,6 @@ vector GetCurrentFov(float fov)
        if(zoomspeed < 0.5 || zoomspeed > 16)
                        zoomspeed = 3.5;
 
-
-       float spawnzoomfactor = bound(1, autocvar_cl_spawnzoom_factor, 16);
-       float spawnzoomspeed = autocvar_cl_spawnzoom_speed;
-
        zoomdir = button_zoom;
        if(hud == HUD_NORMAL)
        if((activeweapon == WEP_NEX && nex_scope) || (activeweapon == WEP_RIFLE && rifle_scope)) // do NOT use switchweapon here
@@ -135,10 +131,9 @@ vector GetCurrentFov(float fov)
        }
        else if(zoomin_effect)
        {
-               /*if(autocvar_cl_spawnzoom_type == 1) { current_viewzoom = (current_viewzoom + drawframetime * spawnzoomspeed * (1 - 1 / spawnzoomfactor)); }
-               else                                                            { */
+               float spawnzoomfactor = bound(1, autocvar_cl_spawnzoom_factor, 16);
                
-               current_viewzoom += (spawnzoomspeed * (spawnzoomfactor - current_viewzoom) * drawframetime); 
+               current_viewzoom += (autocvar_cl_spawnzoom_speed * (spawnzoomfactor - current_viewzoom) * drawframetime); 
                current_viewzoom = bound(1 / spawnzoomfactor, current_viewzoom, 1);
                if(current_viewzoom == 1) { zoomin_effect = 0; }
        }