mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Merge branch 'spbcapsul' into 'master'
No ring capsules when SPB-locked See merge request KartKrew/Kart!452
This commit is contained in:
commit
5e6dac7020
1 changed files with 15 additions and 7 deletions
|
|
@ -278,19 +278,27 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
P_KillMobj(special, toucher, toucher, DMG_NORMAL);
|
P_KillMobj(special, toucher, toucher, DMG_NORMAL);
|
||||||
break;
|
break;
|
||||||
case MT_ITEMCAPSULE:
|
case MT_ITEMCAPSULE:
|
||||||
if (special->threshold != KITEM_SUPERRING
|
|
||||||
&& special->threshold != KITEM_SPB
|
|
||||||
&& !P_CanPickupItem(player, 1))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ((gametyperules & GTR_BUMPERS) && player->bumpers <= 0)
|
if ((gametyperules & GTR_BUMPERS) && player->bumpers <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (special->scale < special->extravalue1) // don't break it while it's respawning
|
if (special->scale < special->extravalue1) // don't break it while it's respawning
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (special->threshold == KITEM_SPB && K_IsSPBInGame()) // don't spawn a second SPB
|
switch (special->threshold)
|
||||||
return;
|
{
|
||||||
|
case KITEM_SPB:
|
||||||
|
if (K_IsSPBInGame()) // don't spawn a second SPB
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case KITEM_SUPERRING:
|
||||||
|
if (player->pflags & PF_RINGLOCK) // no cheaty rings
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (!P_CanPickupItem(player, 1))
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
S_StartSound(toucher, special->info->deathsound);
|
S_StartSound(toucher, special->info->deathsound);
|
||||||
P_KillMobj(special, toucher, toucher, DMG_NORMAL);
|
P_KillMobj(special, toucher, toucher, DMG_NORMAL);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue