]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/player.qh
Port v_angle_old to ClientState
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / player.qh
index 137da56b43de34202c949ad30d20efe76bb0ecc1..23456ebbe74e91c2a95805327c22de92317d2806 100644 (file)
@@ -2,6 +2,11 @@
 
 // Client/server mappings
 
+#ifdef SVQC
+// TODO: get rid of this random dumb include!
+       #include <common/state.qh>
+#endif
+
 .entity conveyor;
 
 .float race_penalty;
@@ -17,8 +22,8 @@
 .float spectatorspeed;
 #endif
 
+.int buttons_old;
 .vector movement_old;
-.float buttons_old;
 .vector v_angle_old;
 .string lastclassname;
 
@@ -206,6 +211,7 @@ STATIC_INIT(PHYS_INPUT_BUTTON_DODGE)
        #define PHYS_INPUT_FRAMETIME                serverdeltatime
 
        #define PHYS_INPUT_MOVEVALUES(s)            input_movevalues
+       #define PHYS_CS(s)                          (s)
 
        #define PHYS_INPUT_BUTTON_BUTTON1(s)        boolean(input_buttons & BIT(0))
        #define PHYS_INPUT_BUTTON_BUTTON2(s)        boolean(input_buttons & BIT(1))
@@ -242,7 +248,7 @@ STATIC_INIT(PHYS_INPUT_BUTTON_DODGE)
 
        bool Physics_Valid(string thecvar);
 
-       void Physics_UpdateStats(entity this, float maxspd_mod);
+       void Physics_UpdateStats(entity this);
 
        void PM_UpdateButtons(entity this, entity store);
 
@@ -259,7 +265,8 @@ STATIC_INIT(PHYS_INPUT_BUTTON_DODGE)
        #define PHYS_INPUT_TIMELENGTH               frametime
        #define PHYS_INPUT_FRAMETIME                sys_frametime
 
-       #define PHYS_INPUT_MOVEVALUES(s)            ((s).movement)
+       #define PHYS_INPUT_MOVEVALUES(s)            CS(s).movement
+       #define PHYS_CS(s)                          CS(s)
 
        #define PHYS_INPUT_BUTTON_BUTTON1(s)        (CS(s).button0)
        #define PHYS_INPUT_BUTTON_BUTTON2(s)        (CS(s).button2)