Add sounds to items that did not make noise before

This commit is contained in:
NepDisk 2025-07-24 15:39:36 -04:00
parent ce1217878b
commit 6ae4e6f7ac
2 changed files with 16 additions and 0 deletions

View file

@ -389,6 +389,7 @@ boolean K_LandMineCollide(mobj_t *t1, mobj_t *t2)
P_DamageMobj(t2, t1, t1->target, 1, DMG_EXPLODE); P_DamageMobj(t2, t1, t1->target, 1, DMG_EXPLODE);
} }
P_SpawnMobj(t1->x, t1->y, t1->z, MT_MINEEXPLOSIONSOUND);
P_KillMobj(t1, t2, t2, DMG_NORMAL); P_KillMobj(t1, t2, t2, DMG_NORMAL);
} }
else if (t2->type == MT_BANANA || t2->type == MT_BANANA_SHIELD else if (t2->type == MT_BANANA || t2->type == MT_BANANA_SHIELD
@ -412,10 +413,12 @@ boolean K_LandMineCollide(mobj_t *t1, mobj_t *t2)
P_SpawnMobj(t2->x/2 + t1->x/2, t2->y/2 + t1->y/2, t2->z/2 + t1->z/2, MT_ITEMCLASH); P_SpawnMobj(t2->x/2 + t1->x/2, t2->y/2 + t1->y/2, t2->z/2 + t1->z/2, MT_ITEMCLASH);
P_SpawnMobj(t1->x, t1->y, t1->z, MT_MINEEXPLOSIONSOUND);
P_KillMobj(t1, t2, t2, DMG_NORMAL); P_KillMobj(t1, t2, t2, DMG_NORMAL);
} }
else if (t2->type == MT_SSMINE_SHIELD || t2->type == MT_SSMINE || t2->type == MT_LANDMINE) else if (t2->type == MT_SSMINE_SHIELD || t2->type == MT_SSMINE || t2->type == MT_LANDMINE)
{ {
P_SpawnMobj(t1->x, t1->y, t1->z, MT_MINEEXPLOSIONSOUND);
P_KillMobj(t1, t2, t2, DMG_NORMAL); P_KillMobj(t1, t2, t2, DMG_NORMAL);
// Bomb death // Bomb death
P_KillMobj(t2, t1, t1, DMG_NORMAL); P_KillMobj(t2, t1, t1, DMG_NORMAL);
@ -424,6 +427,7 @@ boolean K_LandMineCollide(mobj_t *t1, mobj_t *t2)
{ {
// Shootable damage // Shootable damage
P_DamageMobj(t2, t1, t1->target, 1, DMG_NORMAL); P_DamageMobj(t2, t1, t1->target, 1, DMG_NORMAL);
P_SpawnMobj(t1->x, t1->y, t1->z, MT_MINEEXPLOSIONSOUND);
P_KillMobj(t1, t2, t2, DMG_NORMAL); P_KillMobj(t1, t2, t2, DMG_NORMAL);
} }

View file

@ -8036,8 +8036,15 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
player->flamedash--; player->flamedash--;
if (player->flamestore) if (player->flamestore)
{
player->flamestore--; player->flamestore--;
if (player->flametimer == 0 || player->flamestore == 0)
{
S_StopSoundByID(player->mo, sfx_s3kc2l);
}
}
if (player->flametimer > 0) if (player->flametimer > 0)
{ {
if (player->stealingtimer == 0 && player->stolentimer == 0) if (player->stealingtimer == 0 && player->stolentimer == 0)
@ -8047,6 +8054,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->flametimer == 0) if (player->flametimer == 0)
{ {
S_StopSoundByID(player->mo, sfx_s3kc2l);
S_StartSound(player->mo, sfx_s3k47); S_StartSound(player->mo, sfx_s3k47);
K_DropHnextList(player, false); K_DropHnextList(player, false);
} }
@ -10809,6 +10817,10 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
K_PlayBoostTaunt(player->mo); K_PlayBoostTaunt(player->mo);
} }
// Usage sound
if (!S_SoundPlaying(player->mo, sfx_s3kc2l) && player->flametimer != 0 && player->flamestore != 0)
S_StartSound(player->mo, sfx_s3kc2l);
player->flamedash += incr; player->flamedash += incr;
player->flamestore = min(player->flamestore + metincr, FLAMESTOREMAX); player->flamestore = min(player->flamestore + metincr, FLAMESTOREMAX);
player->flametimer -= comincr; player->flametimer -= comincr;