]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/player.qh
Merge branch 'DefaultUser/insta_ammo' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / player.qh
index ae1bd8785586cb792ef18a0e81096b02fca99004..1899b1f60f8d79b3c700f201a660e11fcd219989 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef COMMON_PHYSICS_H
-#define COMMON_PHYSICS_H
+#pragma once
 
 // Client/server mappings
 
@@ -47,6 +46,7 @@ bool IsFlying(entity a);
 #define PHYS_AIRCONTROL(s)                  STAT(MOVEVARS_AIRCONTROL, s)
 #define PHYS_AIRCONTROL_PENALTY(s)          STAT(MOVEVARS_AIRCONTROL_PENALTY, s)
 #define PHYS_AIRCONTROL_POWER(s)            STAT(MOVEVARS_AIRCONTROL_POWER, s)
+#define PHYS_AIRCONTROL_BACKWARDS(s)        STAT(MOVEVARS_AIRCONTROL_BACKWARDS, s)
 #define PHYS_AIRSPEEDLIMIT_NONQW(s)         STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, s)
 #define PHYS_AIRSTOPACCELERATE(s)           STAT(MOVEVARS_AIRSTOPACCELERATE, s)
 #define PHYS_AIRSTRAFEACCELERATE(s)         STAT(MOVEVARS_AIRSTRAFEACCELERATE, s)
@@ -185,9 +185,9 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK)
        .entity hook;
 
 // TODO
-       #define IS_CLIENT(s)                        ((s).isplayermodel)
+       #define IS_CLIENT(s)                        ((s).isplayermodel || (s) == csqcplayer)
        #define IS_PLAYER(s)                        ((s).isplayermodel)
-       #define IS_NOT_A_CLIENT(s)                  (!(s).isplayermodel)
+       #define IS_NOT_A_CLIENT(s)                  (!(s).isplayermodel && (s) != csqcplayer)
        #define isPushable(s)                       ((s).isplayermodel || (s).pushable || ((s).flags & FL_PROJECTILE))
 
        //float player_multijump;
@@ -247,6 +247,8 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK)
 
        bool Physics_Valid(string thecvar);
 
+       void Physics_UpdateStats(entity this, float maxspd_mod);
+
        .float stat_sv_airspeedlimit_nonqw = _STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW);
        .float stat_sv_maxspeed = _STAT(MOVEVARS_MAXSPEED);
 
@@ -325,5 +327,3 @@ NET_HANDLE(setpause, bool)
        return true;
 }
 #endif
-
-#endif