mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Catch all other instances of sounds which might have played where R_CanShowSkinInDemo is false
- Tally - Generic S_StartSound call (where sfx_id is in skinsound region)
This commit is contained in:
parent
b7927fc7a4
commit
75b4bdd4ea
2 changed files with 9 additions and 3 deletions
|
|
@ -517,13 +517,17 @@ void level_tally_t::Init(player_t *player)
|
|||
{
|
||||
// It'd be neat to add all of the grade sounds,
|
||||
// but not this close to release
|
||||
if (rank < GRADE_C)
|
||||
|
||||
UINT8 skinid = player->skin;
|
||||
if (skinid >= numskins || R_CanShowSkinInDemo(skinid) == false)
|
||||
;
|
||||
else if (rank < GRADE_C)
|
||||
{
|
||||
gradeVoice = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_klose].skinsound];
|
||||
gradeVoice = skins[skinid].soundsid[S_sfx[sfx_klose].skinsound];
|
||||
}
|
||||
else
|
||||
{
|
||||
gradeVoice = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_kwin].skinsound];
|
||||
gradeVoice = skins[skinid].soundsid[S_sfx[sfx_kwin].skinsound];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -502,6 +502,8 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
|||
{
|
||||
// redirect player sound to the sound in the skin table
|
||||
skin_t *skin = (origin->player ? &skins[origin->player->skin] : ((skin_t *)origin->skin));
|
||||
if (R_CanShowSkinInDemo(skin-skins) == false)
|
||||
return;
|
||||
sfx_id = skin->soundsid[sfx->skinsound];
|
||||
sfx = &S_sfx[sfx_id];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue