]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/gamecommand.qc
make it compile
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / gamecommand.qc
index 24558057c1e5edf009fc0f5909012c47c43b77c2..0d7e0295f9d26b82ee65617fb03b126f9bcc0ba9 100644 (file)
@@ -1,5 +1,5 @@
 string GotoMap(string m);
-void race_DeleteTime(float pos);
+void race_deleteTime(string map, float pos);
 
 float FullTraceFraction(vector a, vector mi, vector ma, vector b)
 {
@@ -924,6 +924,11 @@ void GameCommand(string command)
                        print(records_reply[i]);
                return;
        }
+       if (argv(0) == "ladder")
+       {
+               print(ladder_reply);
+               return;
+       }
        if (argv(0) == "rankings")
        {
                strunzone(rankings_reply);
@@ -951,6 +956,7 @@ void GameCommand(string command)
        if(argv(0) == "debug_shotorg")
        {
                debug_shotorg = stov(argv(1));
+               debug_shotorg_y = -debug_shotorg_y;
                return;
        }
 
@@ -960,15 +966,25 @@ void GameCommand(string command)
                if(argv(1) == "w")
                        setmodel(e, (nextent(world)).weaponentity.model);
                else
+               {
+                       precache_model(argv(1));
                        setmodel(e, argv(1));
+               }
                e.frame = stof(argv(2));
-               i = gettagindex(e, argv(3));
+               if(substring(argv(3), 0, 1) == "#")
+                       i = stof(substring(argv(3), 1, -1));
+               else
+                       i = gettagindex(e, argv(3));
                if(i)
                {
                        v = gettaginfo(e, i);
-                       print("model ", e.model, " frame ", ftos(e.frame), " tag ", argv(3));
-                       print(" index = ", ftos(i));
+                       print("model ", e.model, " frame ", ftos(e.frame), " tag ", gettaginfo_name);
+                       print(" index ", ftos(i), " parent ", ftos(gettaginfo_parent), "\n");
                        print(" vector = ", ftos(v_x), " ", ftos(v_y), " ", ftos(v_z), "\n");
+                       print(" offset = ", ftos(gettaginfo_offset_x), " ", ftos(gettaginfo_offset_y), " ", ftos(gettaginfo_offset_z), "\n");
+                       print(" forward = ", ftos(gettaginfo_forward_x), " ", ftos(gettaginfo_forward_y), " ", ftos(gettaginfo_forward_z), "\n");
+                       print(" right = ", ftos(gettaginfo_right_x), " ", ftos(gettaginfo_right_y), " ", ftos(gettaginfo_right_z), "\n");
+                       print(" up = ", ftos(gettaginfo_up_x), " ", ftos(gettaginfo_up_y), " ", ftos(gettaginfo_up_z), "\n");
                        if(argc >= 6)
                        {
                                v_y = -v_y;
@@ -1329,7 +1345,22 @@ void GameCommand(string command)
        }
        if(argv(0) == "delrec")
        {
-               race_DeleteTime(stof(argv(1)));
+               if(argv(2) != "")
+                       race_deleteTime(argv(2), stof(argv(1)));
+               else
+                       race_deleteTime(GetMapname(), stof(argv(1)));
+
+               return;
+       }
+
+       if(argv(0) == "showtraceline")
+       {
+               vector src, dst;
+               src = stov(argv(1));
+               dst = stov(argv(2));
+               traceline(src, dst, MOVE_NORMAL, world);
+               trailparticles(world, particleeffectnum("TR_NEXUIZPLASMA"), src, trace_endpos);
+               trailparticles(world, particleeffectnum("TR_CRYLINKPLASMA"), trace_endpos, dst);
                return;
        }