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
}
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; }
}