]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix trace command
authorterencehill <piuntn@gmail.com>
Fri, 24 May 2013 16:17:57 +0000 (18:17 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 24 May 2013 16:17:57 +0000 (18:17 +0200)
qcsrc/server/command/sv_cmd.qc

index 4c0445f1d33a99c3313dc01eca27b44a7f25dd0f..9f4ff7c20ef65e515be38bbd0a9cfa2621de44b7 100644 (file)
@@ -1588,10 +1588,10 @@ void GameCommand_trace(float request, float argc)
                                
                                case "walk":
                                {
-                                       if(argc == 3)
+                                       if(argc == 4)
                                        {
                                                e = nextent(world);
-                                               if(tracewalk(e, stov(argv(1)), e.mins, e.maxs, stov(argv(2)), MOVE_NORMAL))
+                                               if(tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), MOVE_NORMAL))
                                                        print("can walk\n");
                                                else
                                                        print("cannot walk\n");
@@ -1601,10 +1601,10 @@ void GameCommand_trace(float request, float argc)
                                
                                case "showline":
                                {
-                                       if(argc == 3)
+                                       if(argc == 4)
                                        {
-                                               vv = stov(argv(1));
-                                               dv = stov(argv(2));
+                                               vv = stov(argv(2));
+                                               dv = stov(argv(3));
                                                traceline(vv, dv, MOVE_NORMAL, world);
                                                trailparticles(world, particleeffectnum("TR_NEXUIZPLASMA"), vv, trace_endpos);
                                                trailparticles(world, particleeffectnum("TR_CRYLINKPLASMA"), trace_endpos, dv);