]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/sv_cmd.qc
Print an error message if gametype and gotomap are executed when the server isn't...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / sv_cmd.qc
index 200aafe2c57a4a8451f2a2d74ef657e3b0495851..9cb909d541092ecf3aa1de46beaac0cf051c2011 100644 (file)
@@ -715,6 +715,11 @@ void GameCommand_gametype(int request, int argc)
        {
                case CMD_REQUEST_COMMAND:
                {
+                       if (!world_initialized)
+                       {
+                               LOG_INFOF("This command works only when the server is running.");
+                               return;
+                       }
                        if (argv(1) != "")
                        {
                                string s = argv(1);
@@ -888,6 +893,11 @@ void GameCommand_gotomap(int request, int argc)
        {
                case CMD_REQUEST_COMMAND:
                {
+                       if (!world_initialized)
+                       {
+                               LOG_INFOF("This command works only when the server is running.");
+                               return;
+                       }
                        if (argv(1))
                        {
                                LOG_INFO(GotoMap(argv(1)));