diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index c5418afac..b7a279035 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include "editor.h" @@ -1782,14 +1783,6 @@ int CEditor::PopupGoto(CEditor *pEditor, CUIRect View, void *pContext) View.HSplitMid(&CoordXPicker, &CoordYPicker); CoordXPicker.VSplitRight(2.f, &CoordXPicker, nullptr); - int MaxX = pEditor->m_Map.m_pGameLayer->m_Width - 1; - int MaxY = pEditor->m_Map.m_pGameLayer->m_Height - 1; - - if(pEditor->m_GotoX > MaxX) - pEditor->m_GotoX = MaxX; - if(pEditor->m_GotoY > MaxY) - pEditor->m_GotoY = MaxY; - static ColorRGBA s_Color = ColorRGBA(1, 1, 1, 0.5f); enum @@ -1800,8 +1793,8 @@ int CEditor::PopupGoto(CEditor *pEditor, CUIRect View, void *pContext) }; CProperty aProps[] = { - {"X", pEditor->m_GotoX, PROPTYPE_INT_STEP, 0, MaxX}, - {"Y", pEditor->m_GotoY, PROPTYPE_INT_STEP, 0, MaxY}, + {"X", pEditor->m_GotoX, PROPTYPE_INT_STEP, std::numeric_limits::min(), std::numeric_limits::max()}, + {"Y", pEditor->m_GotoY, PROPTYPE_INT_STEP, std::numeric_limits::min(), std::numeric_limits::max()}, {nullptr}, };