Proration is a little more strict near 1st

2x scam distance, but also now it uses K_PlayerScamPERCENTAGE (newer). (Also now that function also uses const for the player!)
This commit is contained in:
VelocitOni 2025-09-01 03:08:29 -04:00
parent c45ee76a2f
commit 74b299887a
2 changed files with 3 additions and 7 deletions

View file

@ -503,7 +503,7 @@ boolean K_IsPlayerLosing(player_t *player)
}
// Some behavior should change if the player approaches the frontrunner unusually fast.
fixed_t K_PlayerScamPercentage(player_t *player, UINT8 mult)
fixed_t K_PlayerScamPercentage(const player_t *player, UINT8 mult)
{
if (!M_NotFreePlay())
return 0;
@ -3156,11 +3156,7 @@ fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player)
if ((gametyperules & GTR_CIRCUIT) && !K_Cooperative() && M_NotFreePlay() && !modeattacking)
{
if (distance < SCAMDIST) // Players near 1st need more speed!
{
fixed_t percentscam = FixedDiv(FRACUNIT*(SCAMDIST - distance), FRACUNIT*SCAMDIST);
required_speed += FixedMul(required_speed, percentscam);
}
required_speed += FixedMul(required_speed, K_PlayerScamPercentage(player, 2)); // Proration: Players near 1st need more speed!
}

View file

@ -145,7 +145,7 @@ UINT32 K_GetPlayerDontDrawFlag(player_t *player);
void K_ReduceVFXForEveryone(mobj_t *mo);
boolean K_IsPlayerLosing(player_t *player);
fixed_t K_PlayerScamPercentage(player_t *player, UINT8 mult);
fixed_t K_PlayerScamPercentage(const player_t *player, UINT8 mult);
fixed_t K_GetKartGameSpeedScalar(SINT8 value);
INT32 K_GetShieldFromItem(INT32 item);