mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Don't lose rings with a shield on hit
This commit is contained in:
parent
955e5d9c80
commit
8c79e57f89
2 changed files with 9 additions and 3 deletions
|
|
@ -3289,6 +3289,10 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
if (!player)
|
||||
return;
|
||||
|
||||
// Has a shield? Don't lose your rings!
|
||||
if (player->kartstuff[k_itemtype] == KITEM_THUNDERSHIELD)
|
||||
return;
|
||||
|
||||
// 20 is the ring cap in kart
|
||||
if (num_rings > 20)
|
||||
num_rings = 20;
|
||||
|
|
|
|||
|
|
@ -1083,10 +1083,12 @@ void P_PlayLivesJingle(player_t *player)
|
|||
|
||||
void P_PlayRinglossSound(mobj_t *source)
|
||||
{
|
||||
if (source->player && source->player->kartstuff[k_rings] <= 0)
|
||||
S_StartSound(source, sfx_s1a6);
|
||||
if (source->player && source->player->kartstuff[k_itemtype] == KITEM_THUNDERSHIELD)
|
||||
S_StartSound(source, sfx_s1a3); // Shield hit (no ring loss)
|
||||
else if (source->player && source->player->kartstuff[k_rings] <= 0)
|
||||
S_StartSound(source, sfx_s1a6); // Ring debt (lessened ring loss)
|
||||
else
|
||||
S_StartSound(source, sfx_s1c6);
|
||||
S_StartSound(source, sfx_s1c6); // Normal ring loss sound
|
||||
}
|
||||
|
||||
void P_PlayDeathSound(mobj_t *source)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue