diff --git a/src/info.c b/src/info.c index a6ec0a044..4e64a278a 100644 --- a/src/info.c +++ b/src/info.c @@ -30299,7 +30299,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 100, // mass 0, // damage sfx_None, // activesound - MF_SOLID|MF_SHOOTABLE|MF_DONTENCOREMAP, // flags + MF_SOLID|MF_SHOOTABLE|MF_DONTENCOREMAP|MF_DONTPUNT, // flags S_NULL // raisestate }, diff --git a/src/k_collide.cpp b/src/k_collide.cpp index 568f87338..8c4a0c078 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -1233,7 +1233,8 @@ void K_PuntHazard(mobj_t *t1, mobj_t *t2) boolean K_PuntCollide(mobj_t *t1, mobj_t *t2) { - if (t1->flags & MF_DONTPUNT) + // MF_SHOOTABLE will get damaged directly, instead + if (t1->flags & (MF_DONTPUNT | MF_SHOOTABLE)) { return false; } diff --git a/src/k_kart.c b/src/k_kart.c index 119619bd0..cd2597e10 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -13160,6 +13160,11 @@ boolean K_IsPlayingDisplayPlayer(player_t *player) boolean K_PlayerCanPunt(player_t *player) { + if (player->trickpanel > TRICKSTATE_READY) + { + return true; + } + if (player->invincibilitytimer > 0) { return true; diff --git a/src/p_map.c b/src/p_map.c index affb16159..924ccd53c 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1472,11 +1472,11 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) // The bump has to happen last if (P_IsObjectOnGround(thing) && tm.thing->momz < 0 && tm.thing->player->trickpanel) { - P_DamageMobj(thing, tm.thing, tm.thing, 1, DMG_WIPEOUT|DMG_STEAL); + P_DamageMobj(thing, tm.thing, tm.thing, 1, DMG_TUMBLE); } else if (P_IsObjectOnGround(tm.thing) && thing->momz < 0 && thing->player->trickpanel) { - P_DamageMobj(tm.thing, thing, thing, 1, DMG_WIPEOUT|DMG_STEAL); + P_DamageMobj(tm.thing, thing, thing, 1, DMG_TUMBLE); } if (K_KartBouncing(tm.thing, thing) == true) @@ -1616,6 +1616,17 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) K_KartBouncing(tm.thing, thing); return BMIT_CONTINUE; } + else if ((thing->flags & MF_SHOOTABLE) && K_PlayerCanPunt(tm.thing->player)) + { + // see if it went over / under + if (tm.thing->z > thing->z + thing->height) + return BMIT_CONTINUE; // overhead + if (tm.thing->z + tm.thing->height < thing->z) + return BMIT_CONTINUE; // underneath + + P_DamageMobj(thing, tm.thing, tm.thing, 1, DMG_NORMAL); + return BMIT_CONTINUE; + } else if (thing->flags & MF_SOLID) { // see if it went over / under