From 8ab8df6789024337d05ed481ad59d1f3fba2363b Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 19 Oct 2018 02:37:45 -0400 Subject: [PATCH] Completely stop when there's no targets possible (if'd out self-destruct code too) --- src/p_enemy.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/p_enemy.c b/src/p_enemy.c index 9c5272d0..a3504be8 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8442,7 +8442,21 @@ void A_SPBChase(mobj_t *actor) // No one there? if (player == NULL || !player->mo) + { +#if 0 + // SELF-DESTRUCT? + mobj_t *spbexplode; + + S_StopSound(actor); // Don't continue playing the gurgle or the siren + spbexplode = P_SpawnMobj(actor->x, actor->y, actor->z, MT_SPBEXPLOSION); + P_SetTarget(&spbexplode->target, actor->target); + + P_RemoveMobj(actor); +#else + actor->momx = actor->momy = actor->momz = 0; +#endif return; + } // Found someone, now get close enough to initiate the slaughter... P_SetTarget(&actor->tracer, player->mo);