diff --git a/src/k_kart.c b/src/k_kart.c index 5fa8625f2..d6b7befc1 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -9342,6 +9342,14 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) if (player->breathTimer < UINT16_MAX) player->breathTimer++; } + + if (spbplace == -1 && modeattacking & ATTACKING_SPB && !player->mo->hitlag && player->mo->health && !P_PlayerInPain(player) && player->laps > 0 && !player->exiting && !(player->pflags & PF_NOCONTEST)) + { + // I'd like this to play a sound to make the situation clearer, but this codepath seems + // to run even when you make standard contact with the SPB. Not sure why. Oh well! + // S_StartSound(NULL, sfx_s26d); + P_DamageMobj(player->mo, NULL, NULL, 1, DMG_INSTAKILL); + } } void K_KartResetPlayerColor(player_t *player) @@ -13016,7 +13024,10 @@ void K_MoveKartPlayer(player_t *player, boolean onground) } if (spbplace == -1 || player->position != spbplace) + { player->pflags &= ~PF_RINGLOCK; // reset ring lock + } + if (K_ItemSingularity(player->itemtype) == true) { diff --git a/src/p_inter.c b/src/p_inter.c index 6b10a0c40..1d42c6235 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2619,6 +2619,13 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source, { player->mo->health--; } + + } + + if (modeattacking & ATTACKING_SPB) + { + P_DamageMobj(player->mo, NULL, NULL, 1, DMG_INSTAKILL); + return true; } if (player->mo->health <= 0)