]> 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..43ce29160bbcc755b2ece904dcbe41d2d1fe2299 100644 (file)
@@ -1568,11 +1568,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 +1600,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;