mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
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:
parent
102a720402
commit
1c107bd877
4 changed files with 6 additions and 0 deletions
|
@ -8123,6 +8123,9 @@ void A_PlayAlertSound(int spriteNum)
|
||||||
{
|
{
|
||||||
if (sprite[spriteNum].extra > 0)
|
if (sprite[spriteNum].extra > 0)
|
||||||
{
|
{
|
||||||
|
if ((VM_OnEventWithReturn(EVENT_RECOGSOUND, spriteNum, myconnectindex, 0)) != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (DYNAMICTILEMAP(PN(spriteNum)))
|
switch (DYNAMICTILEMAP(PN(spriteNum)))
|
||||||
{
|
{
|
||||||
case LIZTROOPONTOILET__STATIC:
|
case LIZTROOPONTOILET__STATIC:
|
||||||
|
|
|
@ -131,6 +131,7 @@ enum GameEvent_t {
|
||||||
EVENT_DISPLAYROOMSEND,
|
EVENT_DISPLAYROOMSEND,
|
||||||
EVENT_DISPLAYEND,
|
EVENT_DISPLAYEND,
|
||||||
EVENT_OPENMENUSOUND,
|
EVENT_OPENMENUSOUND,
|
||||||
|
EVENT_RECOGSOUND,
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
EVENT_ANIMATEALLSPRITES,
|
EVENT_ANIMATEALLSPRITES,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1557,6 +1557,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
||||||
if (sprite[spriteNum].picnum == RESPAWN)
|
if (sprite[spriteNum].picnum == RESPAWN)
|
||||||
pActor->tempang = sprite[newSprite].pal = sprite[spriteNum].pal;
|
pActor->tempang = sprite[newSprite].pal = sprite[spriteNum].pal;
|
||||||
|
|
||||||
|
A_PlayAlertSound(newSprite);
|
||||||
changespritestat(newSprite, STAT_ACTOR);
|
changespritestat(newSprite, STAT_ACTOR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -727,6 +727,7 @@ const char *EventNames[MAXEVENTS] =
|
||||||
"EVENT_DISPLAYROOMSEND",
|
"EVENT_DISPLAYROOMSEND",
|
||||||
"EVENT_DISPLAYEND",
|
"EVENT_DISPLAYEND",
|
||||||
"EVENT_OPENMENUSOUND",
|
"EVENT_OPENMENUSOUND",
|
||||||
|
"EVENT_RECOGSOUND",
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
"EVENT_ANIMATEALLSPRITES",
|
"EVENT_ANIMATEALLSPRITES",
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue