diff --git a/src/info.c b/src/info.c index 0fdde16c6..6c4bfd86e 100644 --- a/src/info.c +++ b/src/info.c @@ -5808,7 +5808,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 }, diff --git a/src/k_kart.c b/src/k_kart.c index 0247b4c8c..83f16464b 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -732,6 +732,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, diff --git a/src/p_inter.c b/src/p_inter.c index 8219ab055..fe3045fb4 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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)) @@ -1927,6 +1925,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; diff --git a/src/p_map.c b/src/p_map.c index 7f1b3bf84..f15c29226 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -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) diff --git a/src/p_mobj.c b/src/p_mobj.c index 4dad2d393..7791217a2 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -2592,6 +2592,8 @@ boolean P_ZMovement(mobj_t *mo) tireAngle += (aOffset * 2); } } + + mom.z = 0; } else if (mo->type == MT_KART_TIRE) { @@ -6961,6 +6963,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); @@ -10268,7 +10271,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)