mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #2467
2467: Add cl_smooth_zoom_time r=def- a=def- as requested on Discord by nils & fokkonaut Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
commit
56ef688489
|
@ -16,7 +16,6 @@
|
|||
#include <engine/serverbrowser.h>
|
||||
|
||||
const float ZoomStep = 0.866025f;
|
||||
const float ZoomTime = 0.25f;
|
||||
|
||||
CCamera::CCamera()
|
||||
{
|
||||
|
@ -57,7 +56,7 @@ void CCamera::ChangeZoom(float Target)
|
|||
m_ZoomSmoothingTarget = Target;
|
||||
m_ZoomSmoothing = CCubicBezier::With(Current, Derivative, 0, m_ZoomSmoothingTarget);
|
||||
m_ZoomSmoothingStart = Now;
|
||||
m_ZoomSmoothingEnd = Now + ZoomTime;
|
||||
m_ZoomSmoothingEnd = Now + (float)g_Config.m_ClSmoothZoomTime / 1000;
|
||||
|
||||
m_Zooming = true;
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ MACRO_CONFIG_INT(ClAutoStatboardScreenshot, cl_auto_statboard_screenshot, 0, 0,
|
|||
MACRO_CONFIG_INT(ClAutoStatboardScreenshotMax, cl_auto_statboard_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created statboard screenshots (0 = no limit)")
|
||||
|
||||
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(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