mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
- Always at least halve the advance vector in P_CheckMissileSpawn().
SVN r4197 (trunk)
This commit is contained in:
parent
06445e8181
commit
0c6c78517b
1 changed files with 2 additions and 1 deletions
|
@ -5277,10 +5277,11 @@ bool P_CheckMissileSpawn (AActor* th, fixed_t 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.
|
||||
while (TVector2<double>(advance).LengthSquared() >= maxsquared)
|
||||
do
|
||||
{
|
||||
advance *= 0.5f;
|
||||
}
|
||||
while (TVector2<double>(advance).LengthSquared() >= maxsquared);
|
||||
th->x += FLOAT2FIXED(advance.X);
|
||||
th->y += FLOAT2FIXED(advance.Y);
|
||||
th->z += FLOAT2FIXED(advance.Z);
|
||||
|
|
Loading…
Reference in a new issue