mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
add an option to only start a new demo when connect while automatically record demos
This commit is contained in:
parent
7691227f24
commit
50b980ea16
|
@ -23,6 +23,7 @@ MACRO_CONFIG_INT(ClLoadCountryFlags, cl_load_country_flags, 1, 0, 1, CFGFLAG_SAV
|
||||||
MACRO_CONFIG_STR(ClSkinFilterString, cl_skin_filter_string, 25, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Skin filtering string")
|
MACRO_CONFIG_STR(ClSkinFilterString, cl_skin_filter_string, 25, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Skin filtering string")
|
||||||
|
|
||||||
MACRO_CONFIG_INT(ClAutoDemoRecord, cl_auto_demo_record, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Automatically record demos")
|
MACRO_CONFIG_INT(ClAutoDemoRecord, cl_auto_demo_record, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Automatically record demos")
|
||||||
|
MACRO_CONFIG_INT(ClAutoDemoOnConnect, cl_auto_demo_on_connect, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Only start a new demo when connect while automatically record demos")
|
||||||
MACRO_CONFIG_INT(ClAutoDemoMax, cl_auto_demo_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically recorded demos (0 = no limit)")
|
MACRO_CONFIG_INT(ClAutoDemoMax, cl_auto_demo_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically recorded demos (0 = no limit)")
|
||||||
MACRO_CONFIG_INT(ClAutoScreenshot, cl_auto_screenshot, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Automatically take game over screenshot")
|
MACRO_CONFIG_INT(ClAutoScreenshot, cl_auto_screenshot, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Automatically take game over screenshot")
|
||||||
MACRO_CONFIG_INT(ClAutoScreenshotMax, cl_auto_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created screenshots (0 = no limit)")
|
MACRO_CONFIG_INT(ClAutoScreenshotMax, cl_auto_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created screenshots (0 = no limit)")
|
||||||
|
|
|
@ -493,6 +493,9 @@ void CGameClient::OnConnected()
|
||||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||||
m_aLastWorldCharacters[i].m_Alive = false;
|
m_aLastWorldCharacters[i].m_Alive = false;
|
||||||
LoadMapSettings();
|
LoadMapSettings();
|
||||||
|
|
||||||
|
if(Client()->State() != IClient::STATE_DEMOPLAYBACK && g_Config.m_ClAutoDemoOnConnect)
|
||||||
|
Client()->DemoRecorder_HandleAutoStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameClient::OnReset()
|
void CGameClient::OnReset()
|
||||||
|
@ -874,7 +877,7 @@ void CGameClient::OnGameOver()
|
||||||
|
|
||||||
void CGameClient::OnStartGame()
|
void CGameClient::OnStartGame()
|
||||||
{
|
{
|
||||||
if(Client()->State() != IClient::STATE_DEMOPLAYBACK)
|
if(Client()->State() != IClient::STATE_DEMOPLAYBACK && !g_Config.m_ClAutoDemoOnConnect)
|
||||||
Client()->DemoRecorder_HandleAutoStart();
|
Client()->DemoRecorder_HandleAutoStart();
|
||||||
m_pStatboard->OnReset();
|
m_pStatboard->OnReset();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue