Skip to content

Commit

Permalink
Add extra checking into A_SpawnSound function
Browse files Browse the repository at this point in the history
before calling the A_SpawnFly function.
Batman TC calls A_SpawnSound during the death sequence of BANE in map 30.
The old version on A_SpawnFly must've fluked a safe exit, the new one goes badly wrong and the game fails to exit.
  • Loading branch information
jeffdoggett committed Mar 1, 2016
1 parent 4e917b3 commit b688f5b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Source/p_enemy.c
Expand Up @@ -2569,8 +2569,13 @@ void A_SpawnFly (mobj_t* mo, pspdef_t* psp)
// travelling cube sound
void A_SpawnSound (mobj_t* mo, pspdef_t* psp)
{
S_StartSound (mo,sfx_boscub);
A_SpawnFly(mo,psp);
S_StartSound (mo,sfx_boscub);

/* Note: Batman TC calls this function when BANE dies at the end */
/* of map 30. If we let it call A_SpawnFly then it's bad news! */

if (mo->type == MT_SPAWNSHOT)
A_SpawnFly (mo,psp);
}


Expand Down

0 comments on commit b688f5b

Please sign in to comment.