From: Mario <zacjardine@y7mail.com>
Date: Thu, 11 Dec 2014 02:59:50 +0000 (+1100)
Subject: Call the setpressedkeys functions in the right place (doesn't fix prediction, but... 
X-Git-Tag: xonotic-v0.8.1~38^2~79
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=43f00c4b83cb5f474067f34cc41530d4558116c6;p=xonotic%2Fxonotic-data.pk3dir.git

Call the setpressedkeys functions in the right place (doesn't fix prediction, but fixes broken prediction)
---

diff --git a/qcsrc/common/physics.qc b/qcsrc/common/physics.qc
index db60f2cb99..58705e9933 100644
--- a/qcsrc/common/physics.qc
+++ b/qcsrc/common/physics.qc
@@ -1767,6 +1767,11 @@ void CSQC_ClientMovement_PlayerMove_Frame()
 		// we REALLY need this handling to happen, even if the move is not executed
 		if (!(PHYS_INPUT_BUTTONS(self) & 2)) // !jump
 			UNSET_JUMP_HELD(self); // canjump = true
+
+#ifdef CSQC
+	PM_dodging_checkpressedkeys();
+	PM_dodging_updatepressedkeys();
+#endif
 }
 
 #ifdef SVQC
diff --git a/qcsrc/server/mutators/mutator_dodging.qc b/qcsrc/server/mutators/mutator_dodging.qc
index 203d19b4de..92faa6a40e 100644
--- a/qcsrc/server/mutators/mutator_dodging.qc
+++ b/qcsrc/server/mutators/mutator_dodging.qc
@@ -310,10 +310,6 @@ void PM_dodging_checkpressedkeys()
 		self.dodging_direction_x = self.dodging_direction_x * 1.0/length;
 		self.dodging_direction_y = self.dodging_direction_y * 1.0/length;
 	}
-
-#ifdef CSQC
-	PM_dodging_updatepressedkeys();
-#endif
 }
 
 void PM_dodging()
@@ -410,10 +406,6 @@ void PM_dodging()
 		self.dodging_direction_x = 0;
 		self.dodging_direction_y = 0;
 	}
-
-#ifdef CSQC
-	PM_dodging_checkpressedkeys();
-#endif
 }
 
 #ifdef SVQC