mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
More lenient Ring Sting
This commit is contained in:
parent
04b202119d
commit
baa0868212
3 changed files with 25 additions and 7 deletions
|
|
@ -150,6 +150,7 @@ typedef enum
|
||||||
PF2_FASTTUMBLEBOUNCE = 1<<9, // Don't lose speed when tumblebouncing.
|
PF2_FASTTUMBLEBOUNCE = 1<<9, // Don't lose speed when tumblebouncing.
|
||||||
|
|
||||||
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
|
||||||
} pflags2_t;
|
} pflags2_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
||||||
|
|
@ -1180,7 +1180,6 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean guard1 = K_PlayerGuard(t1->player);
|
boolean guard1 = K_PlayerGuard(t1->player);
|
||||||
boolean guard2 = K_PlayerGuard(t2->player);
|
boolean guard2 = K_PlayerGuard(t2->player);
|
||||||
|
|
||||||
|
|
@ -1310,11 +1309,30 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean damagedpresting = (t2->player->flashing || P_PlayerInPain(t2->player));
|
||||||
|
|
||||||
|
// CONS_Printf("T1=%s T2=%s\n", player_names[t1->player - players], player_names[t2->player - players]);
|
||||||
|
// CONS_Printf("DPS=%d\n", damagedpresting);
|
||||||
|
|
||||||
|
if (P_PlayerInPain(t1->player) || t1->player->flashing)
|
||||||
|
{
|
||||||
|
// CONS_Printf("T1 pain\n");
|
||||||
|
if (!(t1->player->pflags2 & PF2_SAMEFRAMESTUNG))
|
||||||
|
return false;
|
||||||
|
// CONS_Printf("...but ignored\n");
|
||||||
|
}
|
||||||
|
|
||||||
bool stung = false;
|
bool stung = false;
|
||||||
|
|
||||||
if (t2->player->rings <= 0 && t2->health == 1) // no bumpers
|
if (RINGTOTAL(t2->player) <= 0 && t2->health == 1 && t2->player->spindash == 0)
|
||||||
{
|
{
|
||||||
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");
|
||||||
|
if (!damagedpresting)
|
||||||
|
{
|
||||||
|
t2->player->pflags2 |= PF2_SAMEFRAMESTUNG;
|
||||||
|
// CONS_Printf("T2 SFS\n");
|
||||||
|
}
|
||||||
stung = true;
|
stung = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1331,6 +1349,8 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
||||||
|
|
||||||
if (forEither(doSting, removeDamageHitlag))
|
if (forEither(doSting, removeDamageHitlag))
|
||||||
{
|
{
|
||||||
|
t1->player->pflags2 &= ~PF2_SAMEFRAMESTUNG;
|
||||||
|
t2->player->pflags2 &= ~PF2_SAMEFRAMESTUNG;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3152,14 +3152,11 @@ fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player)
|
||||||
if (modeattacking && !(gametyperules & GTR_CATCHER))
|
if (modeattacking && !(gametyperules & GTR_CATCHER))
|
||||||
required_speed = 4 * K_GetKartSpeed(player, false, false);
|
required_speed = 4 * K_GetKartSpeed(player, false, false);
|
||||||
|
|
||||||
UINT32 distance = K_GetItemRouletteDistance(player, 8);
|
|
||||||
|
|
||||||
if ((gametyperules & GTR_CIRCUIT) && !K_Cooperative() && M_NotFreePlay() && !modeattacking)
|
if ((gametyperules & GTR_CIRCUIT) && !K_Cooperative() && M_NotFreePlay() && !modeattacking)
|
||||||
{
|
{
|
||||||
required_speed += FixedMul(required_speed, K_PlayerScamPercentage(player, 2)); // Proration: Players near 1st need more speed!
|
required_speed += FixedMul(required_speed, K_PlayerScamPercentage(player, 2)); // Proration: Players near 1st need more speed!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (player->offroad && K_ApplyOffroad(player))
|
if (player->offroad && K_ApplyOffroad(player))
|
||||||
{
|
{
|
||||||
// Increase to 300% if you're lawnmowering.
|
// Increase to 300% if you're lawnmowering.
|
||||||
|
|
@ -9838,7 +9835,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
// 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 : player->rings <= 0)
|
if ((gametyperules & GTR_SPHERES) ? player->mo->health <= 1 : RINGTOTAL(player) <= 0)
|
||||||
{
|
{
|
||||||
UINT8 doubler;
|
UINT8 doubler;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue