mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Merge #3427
3427: Remove hardcoded zoom level r=def- a=Jupeyy E.g. on current tournament map its really annoying to not see the whole map at once to get a feeling for the map size ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
commit
f190e529b6
|
@ -14,6 +14,7 @@
|
|||
#include "controls.h"
|
||||
|
||||
#include <engine/serverbrowser.h>
|
||||
#include <limits>
|
||||
|
||||
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<float>::max();
|
||||
}
|
||||
|
||||
float CCamera::MinZoomLevel()
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue