mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
simplified change_map command so that it switches to the next map in the maprotation when called without param
This commit is contained in:
parent
f1ce0d1949
commit
994a44f6e1
|
@ -187,7 +187,7 @@ void CGameClient::OnConsoleInit()
|
||||||
Console()->Register("tune", "si", CFGFLAG_SERVER, 0, 0, "Tune variable to value");
|
Console()->Register("tune", "si", CFGFLAG_SERVER, 0, 0, "Tune variable to value");
|
||||||
Console()->Register("tune_reset", "", CFGFLAG_SERVER, 0, 0, "Reset tuning");
|
Console()->Register("tune_reset", "", CFGFLAG_SERVER, 0, 0, "Reset tuning");
|
||||||
Console()->Register("tune_dump", "", CFGFLAG_SERVER, 0, 0, "Dump tuning");
|
Console()->Register("tune_dump", "", CFGFLAG_SERVER, 0, 0, "Dump tuning");
|
||||||
Console()->Register("change_map", "r", CFGFLAG_SERVER, 0, 0, "Change map");
|
Console()->Register("change_map", "?r", CFGFLAG_SERVER, 0, 0, "Change map");
|
||||||
Console()->Register("restart", "?i", CFGFLAG_SERVER, 0, 0, "Restart in x seconds");
|
Console()->Register("restart", "?i", CFGFLAG_SERVER, 0, 0, "Restart in x seconds");
|
||||||
Console()->Register("broadcast", "r", CFGFLAG_SERVER, 0, 0, "Broadcast message");
|
Console()->Register("broadcast", "r", CFGFLAG_SERVER, 0, 0, "Broadcast message");
|
||||||
Console()->Register("say", "r", CFGFLAG_SERVER, 0, 0, "Say in chat");
|
Console()->Register("say", "r", CFGFLAG_SERVER, 0, 0, "Say in chat");
|
||||||
|
|
|
@ -861,7 +861,7 @@ void CGameContext::ConTuneDump(IConsole::IResult *pResult, void *pUserData)
|
||||||
void CGameContext::ConChangeMap(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConChangeMap(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CGameContext *pSelf = (CGameContext *)pUserData;
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
pSelf->m_pController->ChangeMap(pResult->GetString(0));
|
pSelf->m_pController->ChangeMap(pResult->NumArguments() ? pResult->GetString(0) : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameContext::ConRestart(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConRestart(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
@ -970,7 +970,7 @@ void CGameContext::OnConsoleInit()
|
||||||
Console()->Register("tune_reset", "", CFGFLAG_SERVER, ConTuneReset, this, "");
|
Console()->Register("tune_reset", "", CFGFLAG_SERVER, ConTuneReset, this, "");
|
||||||
Console()->Register("tune_dump", "", CFGFLAG_SERVER, ConTuneDump, this, "");
|
Console()->Register("tune_dump", "", CFGFLAG_SERVER, ConTuneDump, this, "");
|
||||||
|
|
||||||
Console()->Register("change_map", "r", CFGFLAG_SERVER|CFGFLAG_STORE, ConChangeMap, this, "");
|
Console()->Register("change_map", "?r", CFGFLAG_SERVER|CFGFLAG_STORE, ConChangeMap, this, "");
|
||||||
Console()->Register("restart", "?i", CFGFLAG_SERVER|CFGFLAG_STORE, ConRestart, this, "");
|
Console()->Register("restart", "?i", CFGFLAG_SERVER|CFGFLAG_STORE, ConRestart, this, "");
|
||||||
Console()->Register("broadcast", "r", CFGFLAG_SERVER, ConBroadcast, this, "");
|
Console()->Register("broadcast", "r", CFGFLAG_SERVER, ConBroadcast, this, "");
|
||||||
Console()->Register("say", "r", CFGFLAG_SERVER, ConSay, this, "");
|
Console()->Register("say", "r", CFGFLAG_SERVER, ConSay, this, "");
|
||||||
|
|
Loading…
Reference in a new issue