mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix spindash check (player collision removes spindash!)
This commit is contained in:
parent
baa0868212
commit
67109e2da1
3 changed files with 9 additions and 2 deletions
|
|
@ -151,6 +151,7 @@ typedef enum
|
||||||
|
|
||||||
PF2_SERVERTEMPMUTE = 1<<10, // Haven't met gamestochat requirement
|
PF2_SERVERTEMPMUTE = 1<<10, // Haven't met gamestochat requirement
|
||||||
PF2_SAMEFRAMESTUNG = 1<<11, // Goofy bullshit for tracking mutual ring sting
|
PF2_SAMEFRAMESTUNG = 1<<11, // Goofy bullshit for tracking mutual ring sting
|
||||||
|
PF2_UNSTINGABLE = 1<<12, // Was bumped out of spindash
|
||||||
} pflags2_t;
|
} pflags2_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
||||||
|
|
@ -1324,7 +1324,7 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
||||||
|
|
||||||
bool stung = false;
|
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);
|
P_DamageMobj(t2, t1, t1, 1, DMG_STING|DMG_WOMBO);
|
||||||
// CONS_Printf("T2 stung\n");
|
// CONS_Printf("T2 stung\n");
|
||||||
|
|
|
||||||
|
|
@ -967,6 +967,7 @@ void K_PlayerJustBumped(player_t *player)
|
||||||
|
|
||||||
player->justbumped = bumptime;
|
player->justbumped = bumptime;
|
||||||
player->noEbrakeMagnet = ebraketime;
|
player->noEbrakeMagnet = ebraketime;
|
||||||
|
|
||||||
player->spindash = 0;
|
player->spindash = 0;
|
||||||
|
|
||||||
// If spinouttimer is not set yet but could be set later,
|
// 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);
|
K_SpawnGrowShrinkParticles(player->mo, player->growshrinktimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player->spindash)
|
||||||
|
player->pflags2 |= PF2_UNSTINGABLE;
|
||||||
|
else
|
||||||
|
player->pflags2 &= ~PF2_UNSTINGABLE;
|
||||||
|
|
||||||
// Race: spawn ring debt indicator
|
// Race: spawn ring debt indicator
|
||||||
// Battle: spawn zero-bumpers 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;
|
UINT8 doubler;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue