Skip to content

Commit

Permalink
Instant zooming with zoom_speed <= 0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed Sep 12, 2024
1 parent 36ed75c commit 5f49b61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Quake/gl_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ SCR_UpdateZoom
*/
void SCR_UpdateZoom (void)
{
float delta = cl.zoomdir * scr_zoomspeed.value * (cl.time - cl.oldtime);
float speed = scr_zoomspeed.value > 0.f ? scr_zoomspeed.value : 1e6;
float delta = cl.zoomdir * speed * (cl.time - cl.oldtime);
if (!delta)
return;
cl.zoom += delta;
Expand Down

0 comments on commit 5f49b61

Please sign in to comment.