]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/sv_cmd.qc
Merge branch 'master' into terencehill/bot_waypoints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / sv_cmd.qc
index 2bb0f1365c3b71aa353be44d6bc7522438344293..6de4507b1708ef54516d9d5db859bdb960a37457 100644 (file)
@@ -1095,9 +1095,15 @@ void GameCommand_moveplayer(float request, float argc)
 
                                                                // If so, lets continue and finally move the player
                                                                client.team_forced = 0;
-                                                               MoveToTeam(client, team_id, 6);
-                                                               successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
-                                                               LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.");
+                                                               if (MoveToTeam(client, team_id, 6))
+                                                               {
+                                                                       successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
+                                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.");
+                                                               }
+                                                               else
+                                                               {
+                                                                       LOG_INFO("Unable to move player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ")");
+                                                               }
                                                                continue;
                                                        }
                                                        else
@@ -1568,11 +1574,13 @@ void GameCommand_trace(float request, float argc)
 
                                case "walk":
                                {
-                                       if (argc == 4)
+                                       if (argc == 4 || argc == 5)
                                        {
                                                e = nextent(NULL);
-                                               if (tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), MOVE_NORMAL)) LOG_INFO("can walk");
-                                               else LOG_INFO("cannot walk");
+                                               if (tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), stof(argv(4)), MOVE_NORMAL))
+                                                       LOG_INFO("can walk");
+                                               else
+                                                       LOG_INFO("cannot walk");
                                                return;
                                        }
                                }
@@ -1598,7 +1606,9 @@ void GameCommand_trace(float request, float argc)
                        LOG_INFO("Incorrect parameters for ^2trace^7");
                case CMD_REQUEST_USAGE:
                {
-                       LOG_INFO("Usage:^3 sv_cmd trace command (startpos endpos)");
+                       LOG_INFO("Usage:^3 sv_cmd trace command [startpos endpos] [endpos_height]");
+                       LOG_INFO("  Where startpos and endpos are parameters for 'walk' and 'showline' commands,");
+                       LOG_INFO("  'endpos_height' is an optional parameter for 'walk' command,");
                        LOG_INFO("  Full list of commands here: \"debug, debug2, walk, showline.\"");
                        LOG_INFO("See also: ^2bbox, gettaginfo^7");
                        return;