SERVER: Mitigate horizontal/sideways sprinting

This commit is contained in:
cypress 2024-06-04 20:12:35 -07:00
parent 0abf4b18f9
commit 9880a03bb1

View file

@ -1668,6 +1668,8 @@ void() CheckPlayer =
CheckRevive(self);
if (self.sprinting) {
makevectors(self.angles);
// We should stop sprinting if we are falling, technically
// CoD continues the animation but applies a move speed
// penalty, however, that makes no sense! This also applies
@ -1680,6 +1682,11 @@ void() CheckPlayer =
// you're applying less pressure to the analog stick.
else if (vlen(self.velocity) <= 130 && self.sprint_delay <= time + 0.75)
W_SprintStop();
// Another sprinting caveat -- if we are moving a considerabe distance
// horizontally, much more than reasonable, it is very obviously impossible
// to actually sprint.
else if (fabs(self.velocity * v_right) >= fabs(self.velocity * v_forward) * 0.75)
W_SprintStop();
}
// FIXME - can't do frame independent stance changing.. ofs starts spazzing..