From d7e5d178e795fe7c713813c130b190bcc3b78635 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 25 Nov 2021 17:01:41 +0000 Subject: [PATCH] Fix ring capsules popping for you if you have an SPB. --- src/p_inter.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index e0ba88296..1b0ca880d 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -278,19 +278,27 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_KillMobj(special, toucher, toucher, DMG_NORMAL); break; case MT_ITEMCAPSULE: - if (special->threshold != KITEM_SUPERRING - && special->threshold != KITEM_SPB - && !P_CanPickupItem(player, 1)) - return; - if ((gametyperules & GTR_BUMPERS) && player->bumpers <= 0) return; if (special->scale < special->extravalue1) // don't break it while it's respawning return; - if (special->threshold == KITEM_SPB && K_IsSPBInGame()) // don't spawn a second SPB - return; + switch (special->threshold) + { + 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); P_KillMobj(special, toucher, toucher, DMG_NORMAL);