diff --git a/src/k_kart.c b/src/k_kart.c index c92675963..501ba6139 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1306,7 +1306,7 @@ static fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against) } // This kind of wipeout happens with no rings -- doesn't remove a bumper, has no invulnerability, and is much shorter. -static void K_BumpWipeoutPlayer(player_t *player, INT32 length) +static void K_DebtStingPlayer(player_t *player, INT32 length) { if (player->health <= 0) return; @@ -1493,7 +1493,7 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) { if (mobj1->player->kartstuff[k_rings] <= 0) { - K_BumpWipeoutPlayer(mobj1->player, TICRATE + (4 * (mobj2->player->kartweight - mobj1->player->kartweight))); + K_DebtStingPlayer(mobj1->player, TICRATE + (4 * (mobj2->player->kartweight - mobj1->player->kartweight))); K_KartPainEnergyFling(mobj1->player); P_PlayRinglossSound(mobj1); } @@ -1517,7 +1517,7 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) { if (mobj2->player->kartstuff[k_rings] <= 0) { - K_BumpWipeoutPlayer(mobj2->player, TICRATE + (4 * (mobj1->player->kartweight - mobj2->player->kartweight))); + K_DebtStingPlayer(mobj2->player, TICRATE + (4 * (mobj1->player->kartweight - mobj2->player->kartweight))); K_KartPainEnergyFling(mobj2->player); P_PlayRinglossSound(mobj2); } diff --git a/src/p_map.c b/src/p_map.c index 2c766349d..3dd026ee4 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1557,39 +1557,50 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; } - if (P_IsObjectOnGround(thing) && tmthing->momz < 0) { - K_KartBouncing(tmthing, thing, true, false); - if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring]) - { - K_StealBumper(tmthing->player, thing->player, false); - K_SpinPlayer(thing->player, tmthing, 0, tmthing, false); - } - } - else if (P_IsObjectOnGround(tmthing) && thing->momz < 0) - { - K_KartBouncing(thing, tmthing, true, false); - if (G_BattleGametype() && thing->player->kartstuff[k_pogospring]) - { - K_StealBumper(thing->player, tmthing->player, false); - K_SpinPlayer(tmthing->player, thing, 0, thing, false); - } - } - else - K_KartBouncing(tmthing, thing, false, false); + // The bump has to happen last + mobj_t *mo1 = tmthing; + mobj_t *mo2 = thing; + boolean zbounce = false; - if (G_BattleGametype()) - { - if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]) && !(thing->player->powers[pw_flashing])) // Don't steal bumpers while intangible + if (P_IsObjectOnGround(thing) && tmthing->momz < 0) { - K_StealBumper(thing->player, tmthing->player, false); - K_SpinPlayer(tmthing->player, thing, 0, tmthing, false); + zbounce = true; + mo1 = thing; + mo2 = tmthing; + + if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring]) + { + K_StealBumper(tmthing->player, thing->player, false); + K_SpinPlayer(thing->player, tmthing, 0, tmthing, false); + } } - else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]) && !(tmthing->player->powers[pw_flashing])) + else if (P_IsObjectOnGround(tmthing) && thing->momz < 0) { - K_StealBumper(tmthing->player, thing->player, false); - K_SpinPlayer(thing->player, tmthing, 0, thing, false); + zbounce = true; + + if (G_BattleGametype() && thing->player->kartstuff[k_pogospring]) + { + K_StealBumper(thing->player, tmthing->player, false); + K_SpinPlayer(tmthing->player, thing, 0, thing, false); + } } + + if (G_BattleGametype()) + { + if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]) && !(thing->player->powers[pw_flashing])) // Don't steal bumpers while intangible + { + K_StealBumper(thing->player, tmthing->player, false); + K_SpinPlayer(tmthing->player, thing, 0, tmthing, false); + } + else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]) && !(tmthing->player->powers[pw_flashing])) + { + K_StealBumper(tmthing->player, thing->player, false); + K_SpinPlayer(thing->player, tmthing, 0, thing, false); + } + } + + K_KartBouncing(mo1, mo2, zbounce, false); } return true;