diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index 03c06eba2..68ddfb29f 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -8123,6 +8123,9 @@ void A_PlayAlertSound(int spriteNum) { if (sprite[spriteNum].extra > 0) { + if ((VM_OnEventWithReturn(EVENT_RECOGSOUND, spriteNum, myconnectindex, 0)) != 0) + return; + switch (DYNAMICTILEMAP(PN(spriteNum))) { case LIZTROOPONTOILET__STATIC: diff --git a/source/duke3d/src/events_defs.h b/source/duke3d/src/events_defs.h index 73724c592..e268dae36 100644 --- a/source/duke3d/src/events_defs.h +++ b/source/duke3d/src/events_defs.h @@ -131,6 +131,7 @@ enum GameEvent_t { EVENT_DISPLAYROOMSEND, EVENT_DISPLAYEND, EVENT_OPENMENUSOUND, + EVENT_RECOGSOUND, #ifdef LUNATIC EVENT_ANIMATEALLSPRITES, #endif diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 6793459fe..9f8e3ed03 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -1557,6 +1557,7 @@ int A_Spawn(int spriteNum, int tileNum) if (sprite[spriteNum].picnum == RESPAWN) pActor->tempang = sprite[newSprite].pal = sprite[spriteNum].pal; + A_PlayAlertSound(newSprite); changespritestat(newSprite, STAT_ACTOR); } else diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index 5cbf8a1e9..4e5297486 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -727,6 +727,7 @@ const char *EventNames[MAXEVENTS] = "EVENT_DISPLAYROOMSEND", "EVENT_DISPLAYEND", "EVENT_OPENMENUSOUND", + "EVENT_RECOGSOUND", #ifdef LUNATIC "EVENT_ANIMATEALLSPRITES", #endif