diff options
| author | oy <Tom_Adams@web.de> | 2010-11-17 12:50:01 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-11-17 12:50:01 +0100 |
| commit | 994a44f6e1b821517d36f0cf20beaaf07cfca4e4 (patch) | |
| tree | 61407a6451b25ca176a2d730495493e628c1b4d3 | |
| parent | f1ce0d1949a7197a292f5376e3109162cc639390 (diff) | |
| download | zcatch-994a44f6e1b821517d36f0cf20beaaf07cfca4e4.tar.gz zcatch-994a44f6e1b821517d36f0cf20beaaf07cfca4e4.zip | |
simplified change_map command so that it switches to the next map in the maprotation when called without param
| -rw-r--r-- | src/game/client/gameclient.cpp | 2 | ||||
| -rw-r--r-- | src/game/server/gamecontext.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index f782f534..cffbf7ae 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 4d19dd53..c09beb20 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, ""); |