Merge branch 'tutorial-capsules' into 'master'

Allow all capsule spawns in Tutorial (resolves #725)

Closes #725

See merge request KartKrew/Kart!1633
This commit is contained in:
toaster 2023-11-16 10:04:13 +00:00
commit 323975f329

View file

@ -150,33 +150,37 @@ static void K_SpawnItemCapsules(void)
continue;
}
modeFlags = mt->thing_args[3];
if (modeFlags == TMICM_DEFAULT)
if (gametype != GT_TUTORIAL) // Don't prevent capsule spawn via modeflags in Tutorial
{
if (isRingCapsule == true)
modeFlags = mt->thing_args[3];
if (modeFlags == TMICM_DEFAULT)
{
modeFlags = TMICM_MULTIPLAYER|TMICM_TIMEATTACK;
if (isRingCapsule == true)
{
modeFlags = TMICM_MULTIPLAYER|TMICM_TIMEATTACK;
}
else
{
modeFlags = TMICM_MULTIPLAYER;
}
}
if (K_CapsuleTimeAttackRules() == true)
{
if ((modeFlags & TMICM_TIMEATTACK) == 0)
{
continue;
}
}
else
{
modeFlags = TMICM_MULTIPLAYER;
if ((modeFlags & TMICM_MULTIPLAYER) == 0)
{
continue;
}
}
}
if (K_CapsuleTimeAttackRules() == true)
{
if ((modeFlags & TMICM_TIMEATTACK) == 0)
{
continue;
}
}
else
{
if ((modeFlags & TMICM_MULTIPLAYER) == 0)
{
continue;
}
}
P_SpawnMapThing(mt);
}