]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a hack to fix jumping prediction with the engine's version of physics, also defau...
authorMario <zacjardine@y7mail.com>
Thu, 9 Jul 2015 02:13:42 +0000 (12:13 +1000)
committerMario <zacjardine@y7mail.com>
Thu, 9 Jul 2015 02:13:42 +0000 (12:13 +1000)
qcsrc/csqcmodellib/cl_player.qc

index 12ffe5b2f18b83c3ecb88598677cb0fe7e5c0666..4360527674e16be74180abadb8a95aac5279e226 100644 (file)
@@ -135,12 +135,23 @@ void CSQCPlayer_SavePrediction()
 
 void CSQC_ClientMovement_PlayerMove_Frame();
 
+void PM_Movement_Move()
+{
+       runstandardplayerphysics(self);
+#ifdef CSQC
+       self.flags = 
+                       ((self.pmove_flags & PMF_DUCKED) ? FL_DUCKED : 0) |
+                       (!(self.pmove_flags & PMF_JUMP_HELD) ? FL_JUMPRELEASED : 0) |
+                       ((self.pmove_flags & PMF_ONGROUND) ? FL_ONGROUND : 0);
+#endif
+}
+
 void CSQCPlayer_Physics(void)
 {
        switch(autocvar_cl_movement)
        {
-               case 1: runstandardplayerphysics(self); break;
-               case 2: CSQC_ClientMovement_PlayerMove_Frame(); break;
+               case 1: CSQC_ClientMovement_PlayerMove_Frame(); break;
+               case 2: PM_Movement_Move(); break;
        }
 }