]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/player.qh
Merge branch 'master' into Mario/user_movetypes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / player.qh
index 73d2ec932c86da5e5fe06aa702e9f38f95648007..9e7b799d027257e72d1201f6f013fcbffe57eb99 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef COMMON_PHYSICS_H
-#define COMMON_PHYSICS_H
+#pragma once
 
 // Client/server mappings
 
@@ -25,7 +24,7 @@
 .vector v_angle_old;
 .string lastclassname;
 
-.float(entity) PlayerPhysplug;
+.float(entity,float) PlayerPhysplug;
 float AdjustAirAccelQW(float accelqw, float factor);
 
 bool IsFlying(entity a);
@@ -37,6 +36,7 @@ bool IsFlying(entity a);
 #define GAMEPLAYFIX_STEPDOWN(s)             STAT(GAMEPLAYFIX_STEPDOWN, s)
 #define GAMEPLAYFIX_STEPMULTIPLETIMES(s)    STAT(GAMEPLAYFIX_STEPMULTIPLETIMES, s)
 #define GAMEPLAYFIX_UNSTICKPLAYERS(s)       STAT(GAMEPLAYFIX_UNSTICKPLAYERS, s)
+#define GAMEPLAYFIX_WATERTRANSITION(s) STAT(GAMEPLAYFIX_WATERTRANSITION, s)
 
 #define PHYS_ACCELERATE(s)                  STAT(MOVEVARS_ACCELERATE, s)
 #define PHYS_AIRACCELERATE(s)               STAT(MOVEVARS_AIRACCELERATE, s)
@@ -159,14 +159,18 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK)
 #define ITEMS_STAT(s)                       ((s).items)
 
 .float teleport_time;
+#define PHYS_TELEPORT_TIME(s)               ((s).teleport_time)
+
+.float waterjump_time;
+#define PHYS_WATERJUMP_TIME(s)               ((s).waterjump_time)
 
 #ifdef CSQC
 
+       #define PHYS_FIXANGLE(s) ('0 0 0')
+
        string autocvar_cl_jumpspeedcap_min;
        string autocvar_cl_jumpspeedcap_max;
 
-       noref float pmove_waterjumptime;
-
        const int FL_WATERJUMP = 2048;  // player jumping out of water
        const int FL_JUMPRELEASED = 4096;  // for jump debouncing
 
@@ -190,8 +194,6 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK)
 
        #define PHYS_GRAVITY(s)                     STAT(MOVEVARS_GRAVITY, s)
 
-       #define PHYS_TELEPORT_TIME(s)               ((s).teleport_time)
-
        #define TICRATE                             ticrate
 
        #define PHYS_INPUT_ANGLES(s)                input_angles
@@ -240,6 +242,8 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK)
 
 #elif defined(SVQC)
 
+       #define PHYS_FIXANGLE(s) ((s).fixangle)
+
        bool Physics_Valid(string thecvar);
 
        .float stat_sv_airspeedlimit_nonqw = _STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW);
@@ -249,8 +253,6 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK)
        .string jumpspeedcap_min;
        .string jumpspeedcap_max;
 
-       #define PHYS_TELEPORT_TIME(s)               ((s).teleport_time)
-
        #define PHYS_GRAVITY(s)                     autocvar_sv_gravity
 
        #define TICRATE sys_frametime
@@ -322,5 +324,3 @@ NET_HANDLE(setpause, bool)
        return true;
 }
 #endif
-
-#endif