diff --git a/src/k_kart.c b/src/k_kart.c index d6db1849..947f5067 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3134,12 +3134,50 @@ static void K_DoShrink(player_t *player) for (i = 0; i < MAXPLAYERS; i++) { - /*if (playeringame[i]) - P_FlashPal(&players[i], PAL_NUKE, 10);*/ + if (!playeringame[i] || player->spectator || !players[i].mo) + continue; + if (&players[i] == player) + continue; + if (players[i].kartstuff[k_position] < player->kartstuff[k_position]) + { + //P_FlashPal(&players[i], PAL_NUKE, 10); - if (playeringame[i] && players[i].mo && !player->spectator - && players[i].kartstuff[k_position] < player->kartstuff[k_position]) - P_DamageMobj(players[i].mo, player->mo, player->mo, 64); + if (!player->kartstuff[k_invincibilitytimer] // Don't hit while invulnerable! + && player->kartstuff[k_growshrinktimer] <= 0) + { + // Start shrinking! + players[i].mo->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/TICRATE; + players[i].mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8; + if (cv_kartdebugshrink.value && !modeattacking && !players[i].bot) + players[i].mo->destscale = 6*players[i].mo->destscale/8; + + // Wipeout + K_DropItems(&players[i]); + K_SpinPlayer(&players[i], player->mo, 1, false); + + // P_RingDamage + P_DoPlayerPain(&players[i], player->mo, player->mo); + P_ForceFeed(&players[i], 40, 10, TICRATE, 40 + min((players[i].mo->health-1), 100)*2); + P_PlayRinglossSound(players[i].mo); // Ringledingle! + + P_PlayerRingBurst(&players[i], 5); + players[i].mo->momx = players[i].mo->momy = 0; + if (P_IsLocalPlayer(&players[i])) + { + quake.intensity = 32*FRACUNIT; + quake.time = 5; + } + + players[i].kartstuff[k_growshrinktimer] -= (200+(40*(16-players[i].kartstuff[k_position]))); + players[i].kartstuff[k_sneakertimer] = 0; + } + + // Grow should get taken away. + if (players[i].kartstuff[k_growshrinktimer] > 0) + players[i].kartstuff[k_growshrinktimer] = 2; + + S_StartSound(players[i].mo, sfx_kc59); + } } } diff --git a/src/p_inter.c b/src/p_inter.c index fed68f85..6a89159b 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -3239,48 +3239,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da return false; // Don't get hurt by fire generated from friends. } - //{ SRB2kart - special damage sources - - // Shrink - if (damage == 64) - { - if (player == source->player) - return false; - // Don't flip out while super! - if (!player->kartstuff[k_invincibilitytimer] && player->kartstuff[k_growshrinktimer] <= 0) - { - // Start shrinking! - player->mo->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/TICRATE; - player->mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8; - if (cv_kartdebugshrink.value && !modeattacking && !player->bot) - player->mo->destscale = 6*player->mo->destscale/8; - - // Wipeout - K_DropItems(player); - K_SpinPlayer(player, source, 1, false); - damage = player->mo->health - 1; - P_RingDamage(player, inflictor, source, damage); - P_PlayerRingBurst(player, 5); - player->mo->momx = player->mo->momy = 0; - if (P_IsLocalPlayer(player)) - { - quake.intensity = 32*FRACUNIT; - quake.time = 5; - } - - player->kartstuff[k_growshrinktimer] -= (200+(40*(16-player->kartstuff[k_position]))); - } - // Grow? Let's take that away. - if (player->kartstuff[k_growshrinktimer] > 0) - { - player->kartstuff[k_growshrinktimer] = 2; - } - player->kartstuff[k_sneakertimer] = 0; - S_StartSound(player->mo, sfx_kc59); - return true; - } - //} - // Sudden-Death mode if (source && source->type == MT_PLAYER) { diff --git a/src/p_user.c b/src/p_user.c index a168f551..616fc721 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1786,13 +1786,13 @@ void P_DoPlayerExit(player_t *player) { if (!playeringame[i] || players[i].spectator) continue; - if (players[i].exiting || K_IsPlayerLosing(players[i])) // Only start countdown when all winners are declared + if (players[i].exiting || K_IsPlayerLosing(&players[i])) // Only start countdown when all winners are declared continue; break; } if (i == MAXPLAYERS) - countdown = ((!(netgame || multiplayer) ? cv_countdowntime.defaultvalue : cv_countdowntime.value)*TICRATE) + 1; // 30 seconds to finish, get going! + countdown = (((netgame || multiplayer) ? cv_countdowntime.value : 30)*TICRATE) + 1; // 30 seconds to finish, get going! } if (cv_kartvoices.value)