mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix cl_confirm_disconnect/quit_time (fixes #1550)
-1 now works as described Split into two settings
This commit is contained in:
parent
4645b69401
commit
0b578c4330
|
@ -387,7 +387,8 @@ MACRO_CONFIG_INT(ClChatReset, cl_chat_reset, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAV
|
|||
MACRO_CONFIG_INT(ClShowDirection, cl_show_direction, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Show tee direction")
|
||||
MACRO_CONFIG_INT(ClHttpMapDownload, cl_http_map_download, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Try fast HTTP map download first")
|
||||
MACRO_CONFIG_INT(ClOldGunPosition, cl_old_gun_position, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Tees hold gun a bit higher like in TW 0.6.1 and older")
|
||||
MACRO_CONFIG_INT(ClConfirmDisconnectQuitTime, cl_confirm_disconnect_quit_time, 20, -1, 1440, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Confirmation popup before disconnecting/quitting after game time (in minutes, -1 to turn off, 0 to always turn on)")
|
||||
MACRO_CONFIG_INT(ClConfirmDisconnectTime, cl_confirm_disconnect_time, 20, -1, 1440, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Confirmation popup before disconnecting after game time (in minutes, -1 to turn off, 0 to always turn on)")
|
||||
MACRO_CONFIG_INT(ClConfirmQuitTime, cl_confirm_quit_time, 20, -1, 1440, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Confirmation popup before quitting after game time (in minutes, -1 to turn off, 0 to always turn on)")
|
||||
MACRO_CONFIG_STR(ClTimeoutCode, cl_timeout_code, 64, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Timeout code to use")
|
||||
MACRO_CONFIG_STR(ClDummyTimeoutCode, cl_dummy_timeout_code, 64, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Dummy Timeout code to use")
|
||||
MACRO_CONFIG_STR(ClTimeoutSeed, cl_timeout_seed, 64, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Timeout seed")
|
||||
|
|
|
@ -282,7 +282,7 @@ void CGhost::OnNewSnapshot()
|
|||
AddInfos(m_pClient->m_Snap.m_pLocalCharacter);
|
||||
}
|
||||
|
||||
// Record m_LastRaceTick for g_Config.m_ClConfirmDisconnectQuitTime anyway
|
||||
// Record m_LastRaceTick for g_Config.m_ClConfirmDisconnect/QuitTime anyway
|
||||
int RaceTick = -m_pClient->m_Snap.m_pGameInfoObj->m_WarmupTimer;
|
||||
m_LastRaceTick = RaceFlag ? RaceTick : -1;
|
||||
}
|
||||
|
|
|
@ -820,7 +820,7 @@ int CMenus::RenderMenubar(CUIRect r)
|
|||
static int s_QuitButton=0;
|
||||
if(DoButton_MenuTab(&s_QuitButton, "\xEE\x97\x8D", 0, &Button, CUI::CORNER_T))
|
||||
{
|
||||
if(m_pClient->Editor()->HasUnsavedData() || Client()->GetCurrentRaceTime() / 60 >= g_Config.m_ClConfirmDisconnectQuitTime)
|
||||
if(m_pClient->Editor()->HasUnsavedData() || (Client()->GetCurrentRaceTime() / 60 >= g_Config.m_ClConfirmQuitTime && g_Config.m_ClConfirmQuitTime >= 0))
|
||||
{
|
||||
m_Popup = POPUP_QUIT;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ void CMenus::RenderGame(CUIRect MainView)
|
|||
static int s_DisconnectButton = 0;
|
||||
if(DoButton_Menu(&s_DisconnectButton, Localize("Disconnect"), 0, &Button))
|
||||
{
|
||||
if(Client()->GetCurrentRaceTime() / 60 >= g_Config.m_ClConfirmDisconnectQuitTime)
|
||||
if(Client()->GetCurrentRaceTime() / 60 >= g_Config.m_ClConfirmDisconnectTime && g_Config.m_ClConfirmDisconnectTime >= 0)
|
||||
{
|
||||
m_Popup = POPUP_DISCONNECT;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ void CMenus::RenderGame(CUIRect MainView)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(Client()->GetCurrentRaceTime() / 60 >= g_Config.m_ClConfirmDisconnectQuitTime)
|
||||
if(Client()->GetCurrentRaceTime() / 60 >= g_Config.m_ClConfirmDisconnectTime && g_Config.m_ClConfirmDisconnectTime >= 0)
|
||||
{
|
||||
m_Popup = POPUP_DISCONNECT;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue