Merge branch 'emerald-timer' into 'master'

Add fuse to Emeralds in Battle

Closes #126

See merge request KartKrew/Kart!1091
This commit is contained in:
James R 2023-03-27 12:12:17 +00:00
commit 06f58486a5
3 changed files with 7 additions and 1 deletions

View file

@ -247,6 +247,11 @@ mobj_t *K_SpawnChaosEmerald(fixed_t x, fixed_t y, fixed_t z, angle_t angle, SINT
P_SetMobjState(overlay, S_CHAOSEMERALD_UNDER);
overlay->color = emerald->color;
if (gametyperules & GTR_CLOSERPLAYERS)
{
emerald->fuse = BATTLE_DESPAWN_TIME;
}
return emerald;
}

View file

@ -6441,7 +6441,7 @@ mobj_t *K_CreatePaperItem(fixed_t x, fixed_t y, fixed_t z, angle_t angle, SINT8
P_SetTarget(&backdrop->tracer, drop);
backdrop->flags2 |= MF2_LINKDRAW;
if (gametyperules & GTR_BUMPERS)
if (gametyperules & GTR_CLOSERPLAYERS)
{
drop->fuse = BATTLE_DESPAWN_TIME;
}

View file

@ -9636,6 +9636,7 @@ static boolean P_CanFlickerFuse(mobj_t *mobj)
case MT_FLOATINGITEM:
case MT_POGOSPRING:
case MT_KART_LEFTOVER:
case MT_EMERALD:
if (mobj->fuse <= TICRATE)
{
return true;