diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index f782f5345..cffbf7ae1 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -187,7 +187,7 @@ void CGameClient::OnConsoleInit() 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_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("broadcast", "r", CFGFLAG_SERVER, 0, 0, "Broadcast message"); Console()->Register("say", "r", CFGFLAG_SERVER, 0, 0, "Say in chat"); diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 4d19dd531..c09beb208 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -861,7 +861,7 @@ void CGameContext::ConTuneDump(IConsole::IResult *pResult, void *pUserData) void CGameContext::ConChangeMap(IConsole::IResult *pResult, void *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) @@ -970,7 +970,7 @@ void CGameContext::OnConsoleInit() Console()->Register("tune_reset", "", CFGFLAG_SERVER, ConTuneReset, 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("broadcast", "r", CFGFLAG_SERVER, ConBroadcast, this, ""); Console()->Register("say", "r", CFGFLAG_SERVER, ConSay, this, "");