Talk Point: plays sound effect for player who touches it (unless set to invisible)

This commit is contained in:
James R 2024-02-23 17:15:09 -08:00
parent 720cbab51e
commit 78e7bcf643
3 changed files with 10 additions and 0 deletions

View file

@ -100,6 +100,11 @@ struct TalkPoint : Mobj
collect(kCollectDuration); collect(kCollectDuration);
} }
if (!invisible() && P_IsDisplayPlayer(&players[i]))
{
S_StartSound(nullptr, sfx_hint);
}
break; break;
} }
} }

View file

@ -1263,6 +1263,8 @@ sfxinfo_t S_sfx[NUMSFX] =
{"ssbmpr", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR, "UNDESCRIBED SSBMPR"}, // SF_X4AWAYSOUND {"ssbmpr", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR, "UNDESCRIBED SSBMPR"}, // SF_X4AWAYSOUND
{"chcrun", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "UNDESCRIBED CHCRUN"}, {"chcrun", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "UNDESCRIBED CHCRUN"},
{"hint", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hint Ring"},
// Damage sounds // Damage sounds
{"dmga1", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Damaged"}, {"dmga1", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Damaged"},
{"dmga2", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Damaged"}, {"dmga2", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Damaged"},

View file

@ -1338,6 +1338,9 @@ typedef enum
sfx_ssbmpr, sfx_ssbmpr,
sfx_chcrun, sfx_chcrun,
// Tutorial Hint
sfx_hint,
// Damage sounds // Damage sounds
sfx_dmga1, sfx_dmga1,
sfx_dmga2, sfx_dmga2,