FTE/SERVER: Stop doing a bunch of nonsense for checkMovement vectors

This commit is contained in:
Steam Deck User 2023-02-08 22:23:17 -05:00
parent e74e3fb9dd
commit 93d2e7db1a

View file

@ -129,34 +129,26 @@ void() playgetup10 =[ 11, playgetup10 ] {self.frame = 48;}
#define all_move -1 #define all_move -1
float(float dir) checkMovement = 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) { switch(dir) {
case forward: case forward:
if (x > 0) if (self.movement_x > 0)
return 1; return 1;
break; break;
case backward: case backward:
if (x < 0) if (self.movement_x < 0)
return 1; return 1;
break; break;
case right: case right:
if (y > 0) if (self.movement_y > 0)
return 1; return 1;
break; break;
case left: case left:
if (y < 0) if (self.movement_y < 0)
return 1; return 1;
break; break;
case all_move: case all_move:
if (x || y) if (self.movement_x || self.movement_y)
return 1; return 1;
break; break;
default: default: