]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/csqcmodel/cl_player.qc
Use the ONGROUND macros
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / csqcmodel / cl_player.qc
index 10f475fb302cd33770fefef7166ed428741c8a6d..e9973037738df639e2d1f7723dd41214117bbcb2 100644 (file)
@@ -28,7 +28,7 @@
 #include "../../client/defs.qh"
 #include "../../client/main.qh"
 #include "../../common/constants.qh"
-#include "../../common/physics.qh"
+#include "../../common/physics/player.qh"
 #include "../../common/stats.qh"
 #include "../../common/triggers/trigger/viewloc.qh"
 #include "../../common/util.qh"
@@ -173,7 +173,7 @@ void CSQCPlayer_Physics(entity this)
                        //this.move_movetype = MOVETYPE_WALK; // temp
                        this.move_velocity = this.velocity;
                        this.move_avelocity = this.avelocity;
-                       this.move_flags = BITSET(this.move_flags, FL_ONGROUND, boolean(this.flags & FL_ONGROUND));
+                       this.move_flags = BITSET(this.move_flags, FL_ONGROUND, IS_ONGROUND(this));
                        this.move_flags = BITSET(this.move_flags, FL_WATERJUMP, boolean(this.flags & FL_WATERJUMP));
                        this.move_waterlevel = this.waterlevel;
                        this.move_watertype = this.watertype;
@@ -183,7 +183,7 @@ void CSQCPlayer_Physics(entity this)
                this.pmove_flags =
                                ((this.flags & FL_DUCKED) ? PMF_DUCKED : 0) |
                                (!(this.flags & FL_JUMPRELEASED) ? PMF_JUMP_HELD : 0) |
-                               ((this.flags & FL_ONGROUND) ? PMF_ONGROUND : 0);
+                               ((IS_ONGROUND(this)) ? PMF_ONGROUND : 0);
        }
 }
 
@@ -282,7 +282,7 @@ void CSQCPlayer_SetCamera()
                                const vector o = e.origin;
                                csqcplayer_status = CSQCPLAYERSTATUS_PREDICTED;
                                CSQCPlayer_PredictTo(e, servercommandframe + 1, false);
-                               CSQCPlayer_SetPredictionError(e.origin - o, e.velocity - v0, pmove_onground - boolean(e.flags & FL_ONGROUND));
+                               CSQCPlayer_SetPredictionError(e.origin - o, e.velocity - v0, pmove_onground - IS_ONGROUND(e));
                                e.origin = o;
                                e.velocity = v0;