]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics.qh
Predict warpzones
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics.qh
index b266c3c0f5373b30f60d7f93e311c84003c582fe..01a8770a591f75000eadcb590baeae8f175daf49 100644 (file)
@@ -55,8 +55,6 @@ bool IsFlying(entity a);
 
 #define PHYS_FROZEN(s)                      STAT(FROZEN, s)
 
-#define PHYS_GRAVITY(s)                     STAT(MOVEVARS_GRAVITY, s)
-
 #define PHYS_HIGHSPEED                      STAT(MOVEVARS_HIGHSPEED, this)
 
 #define PHYS_JETPACK_ACCEL_SIDE                        STAT(JETPACK_ACCEL_SIDE, this)
@@ -93,6 +91,8 @@ bool IsFlying(entity a);
 
 #ifdef CSQC
 
+       noref float pmove_waterjumptime;
+
        const int FL_WATERJUMP = 2048;  // player jumping out of water
        const int FL_JUMPRELEASED = 4096;       // for jump debouncing
 
@@ -106,11 +106,16 @@ bool IsFlying(entity a);
 // TODO
        #define IS_CLIENT(s)                                            (s).isplayermodel
        #define IS_PLAYER(s)                                            (s).isplayermodel
+       #define IS_NOT_A_CLIENT(s)                                 !(s).isplayermodel
        #define isPushable(s)                                           (s).isplayermodel
 
        //float player_multijump;
        //float player_jumpheight;
 
+       #define PHYS_GRAVITY(s)                     STAT(MOVEVARS_GRAVITY, s)
+
+       #define PHYS_TELEPORT_TIME(s)                           pmove_waterjumptime
+
        #define TICRATE ticrate
 
        #define PHYS_INPUT_ANGLES(s)                            input_angles
@@ -175,6 +180,10 @@ bool IsFlying(entity a);
        /** Not real stats */
        .string stat_jumpspeedcap_min, stat_jumpspeedcap_max;
 
+       #define PHYS_TELEPORT_TIME(s)                           s.teleport_time
+
+       #define PHYS_GRAVITY(s)                     autocvar_sv_gravity
+
        #define TICRATE sys_frametime
 
        #define PHYS_INPUT_ANGLES(s)                            s.v_angle