mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add restart
command to client
This commit is contained in:
parent
aced53c6fe
commit
95b0f8c1e4
|
@ -3478,6 +3478,12 @@ void CClient::Con_Quit(IConsole::IResult *pResult, void *pUserData)
|
|||
pSelf->Quit();
|
||||
}
|
||||
|
||||
void CClient::Con_Restart(IConsole::IResult *pResult, void *pUserData)
|
||||
{
|
||||
CClient *pSelf = (CClient *)pUserData;
|
||||
pSelf->Restart();
|
||||
}
|
||||
|
||||
void CClient::Con_Minimize(IConsole::IResult *pResult, void *pUserData)
|
||||
{
|
||||
CClient *pSelf = (CClient *)pUserData;
|
||||
|
@ -4390,9 +4396,10 @@ void CClient::RegisterCommands()
|
|||
m_pConsole->Register("dummy_disconnect", "", CFGFLAG_CLIENT, Con_DummyDisconnect, this, "Disconnect dummy");
|
||||
m_pConsole->Register("dummy_reset", "", CFGFLAG_CLIENT, Con_DummyResetInput, this, "Reset dummy");
|
||||
|
||||
m_pConsole->Register("quit", "", CFGFLAG_CLIENT | CFGFLAG_STORE, Con_Quit, this, "Quit Teeworlds");
|
||||
m_pConsole->Register("exit", "", CFGFLAG_CLIENT | CFGFLAG_STORE, Con_Quit, this, "Quit Teeworlds");
|
||||
m_pConsole->Register("minimize", "", CFGFLAG_CLIENT | CFGFLAG_STORE, Con_Minimize, this, "Minimize Teeworlds");
|
||||
m_pConsole->Register("quit", "", CFGFLAG_CLIENT | CFGFLAG_STORE, Con_Quit, this, "Quit the client");
|
||||
m_pConsole->Register("exit", "", CFGFLAG_CLIENT | CFGFLAG_STORE, Con_Quit, this, "Quit the client");
|
||||
m_pConsole->Register("restart", "", CFGFLAG_CLIENT | CFGFLAG_STORE, Con_Restart, this, "Restart the client");
|
||||
m_pConsole->Register("minimize", "", CFGFLAG_CLIENT | CFGFLAG_STORE, Con_Minimize, this, "Minimize the client");
|
||||
m_pConsole->Register("connect", "r[host|ip]", CFGFLAG_CLIENT, Con_Connect, this, "Connect to the specified host/ip");
|
||||
m_pConsole->Register("disconnect", "", CFGFLAG_CLIENT, Con_Disconnect, this, "Disconnect from the server");
|
||||
m_pConsole->Register("ping", "", CFGFLAG_CLIENT, Con_Ping, this, "Ping the current server");
|
||||
|
|
|
@ -436,6 +436,7 @@ public:
|
|||
static void Con_DummyResetInput(IConsole::IResult *pResult, void *pUserData);
|
||||
|
||||
static void Con_Quit(IConsole::IResult *pResult, void *pUserData);
|
||||
static void Con_Restart(IConsole::IResult *pResult, void *pUserData);
|
||||
static void Con_DemoPlay(IConsole::IResult *pResult, void *pUserData);
|
||||
static void Con_DemoSpeed(IConsole::IResult *pResult, void *pUserData);
|
||||
static void Con_Minimize(IConsole::IResult *pResult, void *pUserData);
|
||||
|
|
Loading…
Reference in a new issue