Merge branch 'duel-items-in-bonus' into 'master'

Spawn Duel items in GP Bonus

See merge request KartKrew/Kart!1584
This commit is contained in:
Oni 2023-10-29 16:07:29 +00:00
commit fc982e84fd
3 changed files with 9 additions and 2 deletions

View file

@ -122,6 +122,11 @@ void K_TimerReset(void)
g_pointlimit = 0;
}
boolean K_ShouldSpawnDuelItems(void)
{
return (inDuel == true || (grandprixinfo.gp && grandprixinfo.eventmode == GPEVENT_BONUS));
}
static void K_SpawnItemCapsules(void)
{
mapthing_t *mt = mapthings;
@ -263,7 +268,7 @@ void K_TimerInit(void)
timelimitintics = K_TimeLimitForGametype();
g_pointlimit = K_PointLimitForGametype();
if (inDuel == true)
if (K_ShouldSpawnDuelItems())
{
K_SpawnDuelOnlyItems();
}

View file

@ -214,6 +214,8 @@ void K_KartEbrakeVisuals(player_t *p);
void K_HandleDirectionalInfluence(player_t *player);
fixed_t K_DefaultPlayerRadius(player_t *player);
boolean K_ShouldSpawnDuelItems(void);
// sound stuff for lua
void K_PlayAttackTaunt(mobj_t *source);
void K_PlayBoostTaunt(mobj_t *source);

View file

@ -12757,7 +12757,7 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i)
break;
}
if (inDuel == false)
if (!K_ShouldSpawnDuelItems())
{
if (K_IsDuelItem(i) == true
&& K_DuelItemAlwaysSpawns(mthing) == false)