- Always at least halve the advance vector in P_CheckMissileSpawn().

SVN r4197 (trunk)
This commit is contained in:
Randy Heit 2013-03-21 22:23:42 +00:00
parent 06445e8181
commit 0c6c78517b

View file

@ -5277,10 +5277,11 @@ bool P_CheckMissileSpawn (AActor* th, fixed_t maxdist)
// Keep halving the advance vector until we get something less than maxdist // Keep halving the advance vector until we get something less than maxdist
// units away, since we still want to spawn the missile inside the shooter. // units away, since we still want to spawn the missile inside the shooter.
while (TVector2<double>(advance).LengthSquared() >= maxsquared) do
{ {
advance *= 0.5f; advance *= 0.5f;
} }
while (TVector2<double>(advance).LengthSquared() >= maxsquared);
th->x += FLOAT2FIXED(advance.X); th->x += FLOAT2FIXED(advance.X);
th->y += FLOAT2FIXED(advance.Y); th->y += FLOAT2FIXED(advance.Y);
th->z += FLOAT2FIXED(advance.Z); th->z += FLOAT2FIXED(advance.Z);