Add join/leave notification sounds

This commit is contained in:
Sally Coolatta 2020-08-27 20:10:25 -04:00
parent 17318ceec7
commit 82bfdf9ccc
3 changed files with 10 additions and 1 deletions

View file

@ -3363,7 +3363,9 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
#endif #endif
} }
if (msg != KICK_MSG_PLAYER_QUIT) if (msg == KICK_MSG_PLAYER_QUIT)
S_StartSound(NULL, sfx_leave); // intended leave
else
S_StartSound(NULL, sfx_syfail); // he he he S_StartSound(NULL, sfx_syfail); // he he he
switch (msg) switch (msg)
@ -3780,6 +3782,9 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
if (netgame) if (netgame)
{ {
if (node != mynode)
S_StartSound(NULL, sfx_join);
if (server && cv_showjoinaddress.value) if (server && cv_showjoinaddress.value)
{ {
const char *address; const char *address;

View file

@ -816,6 +816,8 @@ sfxinfo_t S_sfx[NUMSFX] =
{"mkuma", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Trigger Happy Havoc Monokuma {"mkuma", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Trigger Happy Havoc Monokuma
{"toada", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Arid Sands Toad scream {"toada", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Arid Sands Toad scream
{"bsnipe", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Banana sniping {"bsnipe", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Banana sniping
{"join", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Player joined server
{"leave", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Player left server
{"requst", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Got a Discord join request {"requst", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Got a Discord join request
{"syfail", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Funny sync failure {"syfail", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Funny sync failure
{"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // :shitsfree: {"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // :shitsfree:

View file

@ -891,6 +891,8 @@ typedef enum
sfx_mkuma, sfx_mkuma,
sfx_toada, sfx_toada,
sfx_bsnipe, sfx_bsnipe,
sfx_join,
sfx_leave,
sfx_requst, sfx_requst,
sfx_syfail, sfx_syfail,
sfx_itfree, sfx_itfree,