diff --git a/src/game/client/components/menus_start.cpp b/src/game/client/components/menus_start.cpp index 5541e396b..ea56bf88a 100644 --- a/src/game/client/components/menus_start.cpp +++ b/src/game/client/components/menus_start.cpp @@ -83,7 +83,16 @@ void CMenus::RenderStartMenu(CUIRect MainView) Menu.HSplitBottom(40.0f, &Menu, &Button); static int s_QuitButton; if(DoButton_Menu(&s_QuitButton, Localize("Quit"), 0, &Button, 0, CUI::CORNER_ALL, Rounding, 0.5f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)) || m_EscapePressed || CheckHotKey(KEY_Q)) - m_Popup = POPUP_QUIT; + { + if(m_EscapePressed || m_pClient->Editor()->HasUnsavedData() || (Client()->GetCurrentRaceTime() / 60 >= g_Config.m_ClConfirmQuitTime && g_Config.m_ClConfirmQuitTime >= 0)) + { + m_Popup = POPUP_QUIT; + } + else + { + Client()->Quit(); + } + } Menu.HSplitBottom(100.0f, &Menu, 0); Menu.HSplitBottom(40.0f, &Menu, &Button);