mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Don't spawn ring capsules in GTR_SPHERES gametypes
This commit is contained in:
parent
b1e412ee33
commit
27489edd3d
1 changed files with 9 additions and 4 deletions
13
src/p_mobj.c
13
src/p_mobj.c
|
|
@ -10729,12 +10729,17 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MT_ITEMCAPSULE:
|
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);
|
boolean isRingCapsule = (mthing->angle < 1 || mthing->angle == KITEM_SUPERRING || mthing->angle >= NUMKARTITEMS);
|
||||||
if (!(mthing->options & MTF_EXTRA) == !isRingCapsule)
|
|
||||||
|
// don't spawn ring capsules in GTR_SPHERES gametypes
|
||||||
|
if (isRingCapsule && (gametyperules & GTR_SPHERES))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// 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
|
||||||
|
&& (!(mthing->options & MTF_EXTRA) == !isRingCapsule))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue