]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics.qh
Impulses: migration pathway
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics.qh
index 0169011c0d844ea28f2cbc5b119897c88f2bf329..6ea77fda90c7be395b29e83d87fc533b4b89b107 100644 (file)
@@ -91,6 +91,9 @@ bool IsFlying(entity a);
 
 #ifdef CSQC
 
+       string autocvar_cl_jumpspeedcap_min;
+       string autocvar_cl_jumpspeedcap_max;
+
        noref float pmove_waterjumptime;
 
        const int FL_WATERJUMP = 2048;  // player jumping out of water
@@ -106,6 +109,7 @@ 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;
@@ -113,7 +117,7 @@ bool IsFlying(entity a);
 
        #define PHYS_GRAVITY(s)                     STAT(MOVEVARS_GRAVITY, s)
 
-       #define PHYS_TELEPORT_TIME(s)                           pmove_waterjumptime
+       #define PHYS_TELEPORT_TIME(s)                           s.teleport_time
 
        #define TICRATE ticrate
 
@@ -162,8 +166,8 @@ bool IsFlying(entity a);
 
        #define ITEMS_STAT(s)                                           (s).items
 
-       #define PHYS_JUMPSPEEDCAP_MIN                           cvar_string("cl_jumpspeedcap_min")
-       #define PHYS_JUMPSPEEDCAP_MAX                           cvar_string("cl_jumpspeedcap_max")
+       #define PHYS_JUMPSPEEDCAP_MIN                           autocvar_cl_jumpspeedcap_min
+       #define PHYS_JUMPSPEEDCAP_MAX                           autocvar_cl_jumpspeedcap_max
 
        #define PHYS_CL_TRACK_CANJUMP(s)            STAT(MOVEVARS_CL_TRACK_CANJUMP, s)
        // FIXME: 0 doesn't mean zero gravity
@@ -177,7 +181,8 @@ bool IsFlying(entity a);
        .float stat_sv_maxspeed = _STAT(MOVEVARS_MAXSPEED);
 
        /** Not real stats */
-       .string stat_jumpspeedcap_min, stat_jumpspeedcap_max;
+       .string jumpspeedcap_min;
+       .string jumpspeedcap_max;
 
        #define PHYS_TELEPORT_TIME(s)                           s.teleport_time