From 56d81678bdae3cbf9f1467a658be0c80382c1614 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Sun, 20 Dec 2020 18:19:53 +0100 Subject: [PATCH] Remove hardcoded zoom level --- src/game/client/components/camera.cpp | 3 ++- src/game/variables.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/client/components/camera.cpp b/src/game/client/components/camera.cpp index 75a4aff08..33aa1490e 100644 --- a/src/game/client/components/camera.cpp +++ b/src/game/client/components/camera.cpp @@ -14,6 +14,7 @@ #include "controls.h" #include +#include const float ZoomStep = 0.866025f; @@ -38,7 +39,7 @@ void CCamera::ScaleZoom(float Factor) float CCamera::MaxZoomLevel() { - return (Graphics()->IsTileBufferingEnabled() ? 60 : 30); + return (g_Config.m_ClLimitMaxZoomLevel) ? ((Graphics()->IsTileBufferingEnabled() ? 60 : 30)) : std::numeric_limits::max(); } float CCamera::MinZoomLevel() diff --git a/src/game/variables.h b/src/game/variables.h index c3e184da2..d7fb4c13e 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -96,6 +96,7 @@ MACRO_CONFIG_INT(ClAutoStatboardScreenshotMax, cl_auto_statboard_screenshot_max, MACRO_CONFIG_INT(ClDefaultZoom, cl_default_zoom, 10, 0, 20, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Default zoom level (10 default, min 0, max 20)") MACRO_CONFIG_INT(ClSmoothZoomTime, cl_smooth_zoom_time, 250, 0, 5000, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Time of smooth zoom animation in ms (0 for off)") +MACRO_CONFIG_INT(ClLimitMaxZoomLevel, cl_limit_max_zoom_level, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Specifies, if zooming should be limited or not (0 = no limit)") MACRO_CONFIG_INT(ClPlayerUseCustomColor, player_use_custom_color, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Toggles usage of custom colors") MACRO_CONFIG_COL(ClPlayerColorBody, player_color_body, 65408, CFGFLAG_CLIENT | CFGFLAG_SAVE | CFGFLAG_COLLIGHT, "Player body color")