mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-19 16:01:35 +00:00
Don't spawn the projectile if you're just gonna delete it
This commit is contained in:
parent
d004515d6a
commit
a67862665a
1 changed files with 2 additions and 6 deletions
|
@ -5654,14 +5654,10 @@ static void P_Boss9Thinker(mobj_t *mobj)
|
|||
if (P_RandomRange(1,(dist>>FRACBITS)/16) == 1)
|
||||
break;
|
||||
}
|
||||
if (spawner)
|
||||
if (spawner && dist)
|
||||
{
|
||||
mobj_t *missile = P_SpawnMissile(spawner, mobj, MT_MSGATHER);
|
||||
|
||||
if (dist == 0)
|
||||
missile->fuse = 0;
|
||||
else
|
||||
missile->fuse = (dist/P_AproxDistance(missile->momx, missile->momy));
|
||||
missile->fuse = (dist/P_AproxDistance(missile->momx, missile->momy));
|
||||
|
||||
if (missile->fuse > mobj->fuse)
|
||||
P_RemoveMobj(missile);
|
||||
|
|
Loading…
Reference in a new issue