mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-10 06:31:44 +00:00
SERVER: Mitigate horizontal/sideways sprinting
This commit is contained in:
parent
0abf4b18f9
commit
9880a03bb1
1 changed files with 7 additions and 0 deletions
|
@ -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..
|
||||
|
|
Loading…
Reference in a new issue