mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-shield-ring-spill' into 'master'
Fix losing rings even with a shield out; fix losing Garden Top before you even activate it See merge request KartKrew/Kart!1625
This commit is contained in:
commit
38a6ac33f0
2 changed files with 11 additions and 2 deletions
|
|
@ -6609,7 +6609,10 @@ void K_PopPlayerShield(player_t *player)
|
|||
return;
|
||||
|
||||
case KSHIELD_TOP:
|
||||
Obj_GardenTopDestroy(player);
|
||||
if (player->curshield == KSHIELD_TOP)
|
||||
{
|
||||
Obj_GardenTopDestroy(player);
|
||||
}
|
||||
return; // everything is handled by Obj_GardenTopDestroy
|
||||
|
||||
case KSHIELD_LIGHTNING:
|
||||
|
|
|
|||
|
|
@ -3181,6 +3181,12 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
break;
|
||||
}
|
||||
|
||||
// Have a shield? You get hit, but don't lose your rings!
|
||||
if (player->curshield != KSHIELD_NONE)
|
||||
{
|
||||
ringburst = 0;
|
||||
}
|
||||
|
||||
if (type != DMG_STUMBLE && type != DMG_WHUMBLE)
|
||||
{
|
||||
if (type != DMG_STING)
|
||||
|
|
@ -3368,7 +3374,7 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
return;
|
||||
|
||||
// Have a shield? You get hit, but don't lose your rings!
|
||||
if (K_GetShieldFromItem(player->itemtype) != KSHIELD_NONE)
|
||||
if (player->curshield != KSHIELD_NONE)
|
||||
return;
|
||||
|
||||
// 20 is the maximum number of rings that can be taken from you at once - half the span of your counter
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue