simplified change_map command so that it switches to the next map in the maprotation when called without param

This commit is contained in:
oy 2010-11-17 12:50:01 +01:00
parent f1ce0d1949
commit 994a44f6e1
2 changed files with 3 additions and 3 deletions

View file

@ -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");

View file

@ -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, "");