From 9151d31512bb0263e133091f418159e4e1539636 Mon Sep 17 00:00:00 2001 From: lachablock Date: Mon, 14 Jun 2021 22:58:36 +1000 Subject: [PATCH] Allow only ring capsules to spawn in Record Attack, and add the ability for Extra to invert this behavior --- src/p_mobj.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 0255f775f..da1a41f9a 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10745,6 +10745,16 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i) if (modifiedgame && !savemoddata) return false; // No cheating!! + break; + case MT_ITEMCAPSULE: + // in record attack, only spawn ring capsules + // (behavior can be inverted with the Extra flag, i.e. item capsule spawns and ring capsule does not) + if (modeattacking) + { + boolean isRingCapsule = (mthing->angle < 1 || mthing->angle == KITEM_SUPERRING || mthing->angle >= NUMKARTITEMS); + if (!(mthing->options & MTF_EXTRA) == !isRingCapsule) + return false; + } break; default: break;