From 69a74963ce3c18f840061c7d8aa4655d36b1c5a3 Mon Sep 17 00:00:00 2001 From: Ravie <65019210+HiRavie@users.noreply.github.com> Date: Wed, 17 Jan 2024 23:36:09 +0100 Subject: [PATCH] Allow finer editor grid --- src/game/editor/map_grid.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/editor/map_grid.cpp b/src/game/editor/map_grid.cpp index b02701c68..4e7124555 100644 --- a/src/game/editor/map_grid.cpp +++ b/src/game/editor/map_grid.cpp @@ -63,7 +63,11 @@ void CMapGrid::OnRender(CUIRect View) int CMapGrid::GridLineDistance() const { - if(Editor()->MapView()->Zoom()->GetValue() <= 100.0f) + if(Editor()->MapView()->Zoom()->GetValue() <= 10.0f) + return 4; + else if(Editor()->MapView()->Zoom()->GetValue() <= 50.0f) + return 8; + else if(Editor()->MapView()->Zoom()->GetValue() <= 100.0f) return 16; else if(Editor()->MapView()->Zoom()->GetValue() <= 250.0f) return 32;