diff --git a/qw/source/pmove.c b/qw/source/pmove.c index 5b82b049a..9dc3075c8 100644 --- a/qw/source/pmove.c +++ b/qw/source/pmove.c @@ -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); diff --git a/qw/source/sv_phys.c b/qw/source/sv_phys.c index 624988221..0b2061a6d 100644 --- a/qw/source/sv_phys.c +++ b/qw/source/sv_phys.c @@ -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);