POINTS power-up: play SRB2 emerald token SFX on pickup

This commit is contained in:
James R 2024-01-26 15:26:13 -08:00
parent 87531075f1
commit c2c15f12d3

View file

@ -6,6 +6,8 @@
#include "k_objects.h"
#include "k_powerup.h"
#include "k_hud.h" // K_AddMessage
#include "p_mobj.h"
#include "s_sound.h"
tic_t K_PowerUpRemaining(const player_t* player, kartitems_t powerup)
{
@ -91,6 +93,11 @@ void K_GivePowerUp(player_t* player, kartitems_t powerup, tic_t time)
case POWERUP_POINTS:
K_AddMessageForPlayer(player, "Got 6 POINTS!", true, false);
K_GivePointsToPlayer(player, nullptr, 6);
if (!P_MobjWasRemoved(player->mo))
{
S_StartSound(player->mo, sfx_token);
}
break;
default: