From 93d2e7db1ad959b43eb6609b2b8fd9e2efae677c Mon Sep 17 00:00:00 2001 From: Steam Deck User Date: Wed, 8 Feb 2023 22:23:17 -0500 Subject: [PATCH] FTE/SERVER: Stop doing a bunch of nonsense for checkMovement vectors --- source/server/player.qc | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/source/server/player.qc b/source/server/player.qc index 39bc7a4..a00ec18 100644 --- a/source/server/player.qc +++ b/source/server/player.qc @@ -129,34 +129,26 @@ void() playgetup10 =[ 11, playgetup10 ] {self.frame = 48;} #define all_move -1 float(float dir) checkMovement = -{ - makevectors(self.movement); - string a = vtos(self.movement); - float x, y; - - tokenize(a); - x = stof(argv(0)); - y = stof(argv(1)); - +{ switch(dir) { case forward: - if (x > 0) + if (self.movement_x > 0) return 1; break; case backward: - if (x < 0) + if (self.movement_x < 0) return 1; break; case right: - if (y > 0) + if (self.movement_y > 0) return 1; break; case left: - if (y < 0) + if (self.movement_y < 0) return 1; break; case all_move: - if (x || y) + if (self.movement_x || self.movement_y) return 1; break; default: