diff --git a/src/d_player.h b/src/d_player.h index 4c705c4cf..f36065f0a 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -151,6 +151,7 @@ typedef enum PF2_SERVERTEMPMUTE = 1<<10, // Haven't met gamestochat requirement PF2_SAMEFRAMESTUNG = 1<<11, // Goofy bullshit for tracking mutual ring sting + PF2_UNSTINGABLE = 1<<12, // Was bumped out of spindash } pflags2_t; typedef enum diff --git a/src/k_collide.cpp b/src/k_collide.cpp index e0afef1c8..ed3ba0072 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -1324,7 +1324,7 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2) bool stung = false; - if (RINGTOTAL(t2->player) <= 0 && t2->health == 1 && t2->player->spindash == 0) + if (RINGTOTAL(t2->player) <= 0 && t2->health == 1 && !(t2->player->pflags2 & PF2_UNSTINGABLE)) { P_DamageMobj(t2, t1, t1, 1, DMG_STING|DMG_WOMBO); // CONS_Printf("T2 stung\n"); diff --git a/src/k_kart.c b/src/k_kart.c index 921ab01a4..e808bcd4c 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -967,6 +967,7 @@ void K_PlayerJustBumped(player_t *player) player->justbumped = bumptime; player->noEbrakeMagnet = ebraketime; + player->spindash = 0; // If spinouttimer is not set yet but could be set later, @@ -9833,9 +9834,14 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) K_SpawnGrowShrinkParticles(player->mo, player->growshrinktimer); } + if (player->spindash) + player->pflags2 |= PF2_UNSTINGABLE; + else + player->pflags2 &= ~PF2_UNSTINGABLE; + // Race: spawn ring debt indicator // Battle: spawn zero-bumpers indicator - if ((gametyperules & GTR_SPHERES) ? player->mo->health <= 1 : RINGTOTAL(player) <= 0) + if (!(player->pflags2 & PF2_UNSTINGABLE) && ((gametyperules & GTR_SPHERES) ? player->mo->health <= 1 : RINGTOTAL(player) <= 0)) { UINT8 doubler;