]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix it more cleanly
authorMario <mario@smbclan.net>
Wed, 2 Dec 2015 00:41:17 +0000 (10:41 +1000)
committerMario <mario@smbclan.net>
Wed, 2 Dec 2015 00:41:17 +0000 (10:41 +1000)
qcsrc/common/physics.qh
qcsrc/common/triggers/trigger/jumppads.qc

index 9c1bed68f4cfee9204c14068731e8ed6d1294206..0169011c0d844ea28f2cbc5b119897c88f2bf329 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)
@@ -113,6 +111,8 @@ bool IsFlying(entity a);
        //float player_multijump;
        //float player_jumpheight;
 
+       #define PHYS_GRAVITY(s)                     STAT(MOVEVARS_GRAVITY, s)
+
        #define PHYS_TELEPORT_TIME(s)                           pmove_waterjumptime
 
        #define TICRATE ticrate
@@ -181,6 +181,8 @@ bool IsFlying(entity a);
 
        #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
index 758ab9e801424ed717e34ab87777743a4abea66a..ea3170a24f4826bff2acca9f568765a7728556db 100644 (file)
@@ -37,11 +37,7 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht)
 
        torg = tgt.origin + (tgt.mins + tgt.maxs) * 0.5;
 
-#ifdef SVQC
-       grav = autocvar_sv_gravity;
-#elif defined(CSQC)
        grav = PHYS_GRAVITY(other);
-#endif
        if(PHYS_ENTGRAVITY(other))
                grav *= PHYS_ENTGRAVITY(other);