MT_KART_LEFTOVER: remove fuse, let it be killed

Gets punted into the air when it's killed.
This commit is contained in:
James R 2023-11-15 20:03:44 -08:00
parent 6d883feadf
commit 72f1414432
5 changed files with 30 additions and 6 deletions

View file

@ -5802,7 +5802,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
1000, // mass
0, // damage
sfx_None, // activesound
MF_SOLID|MF_DONTENCOREMAP|MF_APPLYTERRAIN|MF_SLOPE, // flags
MF_SOLID|MF_DONTENCOREMAP|MF_APPLYTERRAIN|MF_SLOPE|MF_SHOOTABLE, // flags
S_NULL // raisestate
},

View file

@ -728,6 +728,11 @@ fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against)
static void K_SpawnBumpForObjs(mobj_t *mobj1, mobj_t *mobj2)
{
if (mobj1->type == MT_KART_LEFTOVER && mobj1->health == 0)
{
return;
}
mobj_t *fx = P_SpawnMobj(
mobj1->x/2 + mobj2->x/2,
mobj1->y/2 + mobj2->y/2,

View file

@ -1545,7 +1545,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|| target->type == MT_DROPTARGET || target->type == MT_DROPTARGET_SHIELD
|| target->type == MT_EGGMANITEM || target->type == MT_EGGMANITEM_SHIELD
|| target->type == MT_BALLHOG || target->type == MT_SPB
|| target->type == MT_GACHABOM)) // kart dead items
|| target->type == MT_GACHABOM || target->type == MT_KART_LEFTOVER)) // kart dead items
target->flags |= MF_NOGRAVITY; // Don't drop Tails 03-08-2000
else
target->flags &= ~MF_NOGRAVITY; // lose it if you for whatever reason have it, I'm looking at you shields
@ -1876,8 +1876,6 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
if (target->player->pflags & PF_NOCONTEST)
P_SetTarget(&target->tracer, kart);
kart->fuse = 5*TICRATE;
}
if (source && !P_MobjWasRemoved(source))
@ -1923,6 +1921,16 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
}
break;
case MT_KART_LEFTOVER:
if (!P_MobjWasRemoved(inflictor))
{
K_KartSolidBounce(target, inflictor);
target->momz = 20 * inflictor->scale * P_MobjFlip(inflictor);
}
target->z += P_MobjFlip(target);
target->tics = 175;
return;
case MT_METALSONIC_RACE:
target->fuse = TICRATE*3;
target->momx = target->momy = target->momz = 0;

View file

@ -962,6 +962,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|| tm.thing->type == MT_SSMINE || tm.thing->type == MT_LANDMINE || tm.thing->type == MT_SINK
|| tm.thing->type == MT_GARDENTOP
|| tm.thing->type == MT_DROPTARGET
|| tm.thing->type == MT_KART_LEFTOVER
|| (tm.thing->type == MT_PLAYER && thing->target != tm.thing)))
{
// see if it went over / under
@ -979,6 +980,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|| thing->type == MT_SSMINE || thing->type == MT_LANDMINE || thing->type == MT_SINK
|| thing->type == MT_GARDENTOP
|| thing->type == MT_DROPTARGET
|| thing->type == MT_KART_LEFTOVER
|| (thing->type == MT_PLAYER && tm.thing->target != thing)))
{
// see if it went over / under
@ -1002,6 +1004,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|| tm.thing->type == MT_GARDENTOP
|| tm.thing->type == MT_MONITOR
|| tm.thing->type == MT_BATTLECAPSULE
|| tm.thing->type == MT_KART_LEFTOVER
|| (tm.thing->type == MT_PLAYER)))
{
// see if it went over / under
@ -1019,6 +1022,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|| thing->type == MT_GARDENTOP
|| thing->type == MT_MONITOR
|| thing->type == MT_BATTLECAPSULE
|| thing->type == MT_KART_LEFTOVER
|| (thing->type == MT_PLAYER)))
{
// see if it went over / under
@ -1572,7 +1576,14 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
if (tm.thing->z + tm.thing->height < thing->z)
return BMIT_CONTINUE; // underneath
K_KartBouncing(tm.thing, thing);
if (K_PlayerCanPunt(tm.thing->player))
{
P_DamageMobj(thing, tm.thing, tm.thing, 1, DMG_NORMAL);
}
else
{
K_KartBouncing(tm.thing, thing);
}
return BMIT_CONTINUE;
}
else if (thing->type == MT_MONITOR)

View file

@ -6955,6 +6955,7 @@ static boolean P_MobjDeadThink(mobj_t *mobj)
//case MT_DROPTARGET:
case MT_SPB:
case MT_GACHABOM:
case MT_KART_LEFTOVER:
if (P_IsObjectOnGround(mobj))
{
P_RemoveMobj(mobj);
@ -10260,7 +10261,6 @@ static boolean P_CanFlickerFuse(mobj_t *mobj)
case MT_FALLINGROCK:
case MT_FLOATINGITEM:
case MT_POGOSPRING:
case MT_KART_LEFTOVER:
case MT_EMERALD:
case MT_BLENDEYE_PUYO:
if (mobj->fuse <= TICRATE)