CON: Add EVENT_RECOGSOUND.

Set RETURN to -1 to disable the sound played when an enemy awaken. You have to use a command to play a sound, because the bosses use globalsound.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6517 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-11-29 07:29:40 +00:00
parent 102a720402
commit 1c107bd877
4 changed files with 6 additions and 0 deletions

View file

@ -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:

View file

@ -131,6 +131,7 @@ enum GameEvent_t {
EVENT_DISPLAYROOMSEND,
EVENT_DISPLAYEND,
EVENT_OPENMENUSOUND,
EVENT_RECOGSOUND,
#ifdef LUNATIC
EVENT_ANIMATEALLSPRITES,
#endif

View file

@ -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

View file

@ -727,6 +727,7 @@ const char *EventNames[MAXEVENTS] =
"EVENT_DISPLAYROOMSEND",
"EVENT_DISPLAYEND",
"EVENT_OPENMENUSOUND",
"EVENT_RECOGSOUND",
#ifdef LUNATIC
"EVENT_ANIMATEALLSPRITES",
#endif