]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cheats.qc
Merge branch 'TimePath/experiments/csqc_prediction' into Mario/qc_physics
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cheats.qc
index 716f4068dd1554de45a88af09b481505dd73fb87..3119182a64fde2027979ce62db82066dad90a4ab 100644 (file)
@@ -1,8 +1,13 @@
+#include "cheats.qh"
+#include "g_damage.qh"
+#include "race.qh"
+#include "t_teleporters.qh"
+
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qc"
-    #include "../dpdefs/dpextensions.qc"
+       #include "../dpdefs/progsdefs.qh"
+    #include "../dpdefs/dpextensions.qh"
     #include "../warpzonelib/anglestransform.qh"
     #include "../warpzonelib/util_server.qh"
     #include "../common/constants.qh"
@@ -13,9 +18,9 @@
     #include "autocvars.qh"
     #include "defs.qh"
     #include "../common/deathtypes.qh"
+       #include "../common/triggers/subs.qh"
     #include "mutators/mutators_include.qh"
     #include "../csqcmodellib/sv_model.qh"
-    #include "cheats.qh"
 #endif
 
 void CopyBody(float keepvelocity);
@@ -123,7 +128,7 @@ void info_autoscreenshot_findtarget()
                return;
        }
        vector a = vectoangles(e.origin - self.origin);
-       a_x = -a.x; // don't ask
+       a.x = -a.x; // don't ask
        self.angles_x = a.x;
        self.angles_y = a.y;
        // we leave Rick Roll alone
@@ -440,9 +445,9 @@ float CheatCommand(float argc)
                        e.enemy.skin = 1;
                        setsize(e.enemy, '0 0 0', '0 0 0');
                        end = normalize(self.origin + self.view_ofs - e.aiment.origin);
-                       end_x = (end.x > 0) * 2 - 1;
-                       end_y = (end.y > 0) * 2 - 1;
-                       end_z = (end.z > 0) * 2 - 1;
+                       end.x = (end.x > 0) * 2 - 1;
+                       end.y = (end.y > 0) * 2 - 1;
+                       end.z = (end.z > 0) * 2 - 1;
                        if(argc == 4)
                                setorigin(e.enemy, stov(argv(3)));
                        else
@@ -788,6 +793,16 @@ float CheatFrame()
 
 // ENTITY DRAGGING
 
+// on dragger:
+.float draggravity;
+.float dragspeed; // speed of mouse wheel action
+.float dragdistance; // distance of dragentity's draglocalvector from view_ofs
+.vector draglocalvector; // local attachment vector of the dragentity
+.float draglocalangle;
+// on draggee:
+.entity draggedby;
+.float dragmovetype;
+
 float Drag(float force_allow_pick, float ischeat)
 {
        BEGIN_CHEAT_FUNCTION();
@@ -889,15 +904,6 @@ float Drag(float force_allow_pick, float ischeat)
        return false;
 }
 
-// on dragger:
-.float draggravity;
-.float dragspeed; // speed of mouse wheel action
-.float dragdistance; // distance of dragentity's draglocalvector from view_ofs
-.vector draglocalvector; // local attachment vector of the dragentity
-.float draglocalangle;
-// on draggee:
-.entity draggedby;
-.float dragmovetype;
 void Drag_Begin(entity dragger, entity draggee, vector touchpoint)
 {
        float tagscale;