mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
if the velocity is 0, don't bother clipping it.
This commit is contained in:
parent
da1f9fcf44
commit
676527a0d3
2 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue