]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/player.qh
Remove .move_* fields and MOVETYPE_PUSH logic (doesn't work)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / player.qh
index ea318c5b013f540801aa5fa2d196c5e5a8e9ea0a..de76bb8d8c234cbe8b17c35ed17711ec5f843f75 100644 (file)
@@ -23,7 +23,7 @@
 .vector v_angle_old;
 .string lastclassname;
 
-.float() PlayerPhysplug;
+.float(entity) PlayerPhysplug;
 float AdjustAirAccelQW(float accelqw, float factor);
 
 bool IsFlying(entity a);
@@ -67,6 +67,7 @@ bool IsFlying(entity a);
 #define PHYS_JETPACK_FUEL(s)                STAT(JETPACK_FUEL, s)
 #define PHYS_JETPACK_MAXSPEED_SIDE(s)       STAT(JETPACK_MAXSPEED_SIDE, s)
 #define PHYS_JETPACK_MAXSPEED_UP(s)         STAT(JETPACK_MAXSPEED_UP, s)
+#define PHYS_JETPACK_REVERSE_THRUST(s)         STAT(JETPACK_REVERSE_THRUST, s)
 
 #define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS(s) STAT(MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS, s)
 #define PHYS_JUMPSTEP(s)                    STAT(MOVEVARS_JUMPSTEP, s)
@@ -99,6 +100,15 @@ bool IsFlying(entity a);
 #define PHYS_INPUT_BUTTON_ZOOM(s)           PHYS_INPUT_BUTTON_BUTTON4(s)
 #define PHYS_INPUT_BUTTON_CROUCH(s)         PHYS_INPUT_BUTTON_BUTTON5(s)
 #define PHYS_INPUT_BUTTON_HOOK(s)           PHYS_INPUT_BUTTON_BUTTON6(s)
+
+#ifdef CSQC
+STATIC_INIT(PHYS_INPUT_BUTTON_HOOK)
+{
+       localcmd("alias +hook +button6\n");
+       localcmd("alias -hook -button6\n");
+}
+#endif
+
 #define PHYS_INPUT_BUTTON_INFO(s)           PHYS_INPUT_BUTTON_BUTTON7(s)
 #define PHYS_INPUT_BUTTON_DRAG(s)           PHYS_INPUT_BUTTON_BUTTON8(s)
 #define PHYS_INPUT_BUTTON_USE(s)            PHYS_INPUT_BUTTON_BUTTON_USE(s)
@@ -107,6 +117,14 @@ bool IsFlying(entity a);
 #define PHYS_INPUT_BUTTON_ZOOMSCRIPT(s)     PHYS_INPUT_BUTTON_BUTTON9(s)
 #define PHYS_INPUT_BUTTON_JETPACK(s)        PHYS_INPUT_BUTTON_BUTTON10(s)
 
+#ifdef CSQC
+STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK)
+{
+       localcmd("alias +jetpack +button10\n");
+    localcmd("alias -jetpack -button10\n");
+}
+#endif
+
 // if more buttons are needed, start using impulse bits as buttons
 
 #define PHYS_INPUT_BUTTON_BACKWARD(s)       (PHYS_INPUT_MOVEVALUES(s).x < 0)
@@ -138,6 +156,8 @@ bool IsFlying(entity a);
 
 #define ITEMS_STAT(s)                       ((s).items)
 
+.float teleport_time;
+
 #ifdef CSQC
 
        string autocvar_cl_jumpspeedcap_min;
@@ -155,6 +175,8 @@ bool IsFlying(entity a);
        .vector movement;
        .vector v_angle;
 
+       .entity hook;
+
 // TODO
        #define IS_CLIENT(s)                        ((s).isplayermodel)
        #define IS_PLAYER(s)                        ((s).isplayermodel)