if the velocity is 0, don't bother clipping it.

This commit is contained in:
Bill Currie 2002-02-25 18:40:51 +00:00
parent da1f9fcf44
commit 676527a0d3
2 changed files with 7 additions and 2 deletions

View file

@ -131,8 +131,10 @@ PM_FlyMove (void)
time_left = frametime;
for (bumpcount = 0; bumpcount < numbumps; bumpcount++) {
for (i = 0; i < 3; i++)
end[i] = pmove.origin[i] + time_left * pmove.velocity[i];
if (VectorIsZero (pmove.velocity))
break;
VectorMA (pmove.origin, time_left, pmove.velocity, end);
trace = PM_PlayerMove (pmove.origin, end);

View file

@ -258,6 +258,9 @@ SV_FlyMove (edict_t *ent, float time, trace_t *steptrace)
time_left = time;
for (bumpcount = 0; bumpcount < numbumps; bumpcount++) {
if (VectorIsZero (SVvector (ent, velocity)))
break;
VectorMA (SVvector (ent, origin), time_left, SVvector (ent, velocity),
end);