Recovery stat has risen from its grave

Boost stacking potential is increased for low weight. Also changed order of operations so that flashing tics differences are more significant in Battle.
This commit is contained in:
Sally Coolatta 2020-07-22 18:21:50 -04:00
parent ec07d27170
commit 089cffd900

View file

@ -2025,9 +2025,18 @@ static fixed_t K_FlameShieldDashVar(INT32 val)
return (3*FRACUNIT/4) + (((val * FRACUNIT) / TICRATE) / 2); return (3*FRACUNIT/4) + (((val * FRACUNIT) / TICRATE) / 2);
} }
// GAME OVER
// RETURN OF THE RECOVERY STAT FROM KARTZ
#define RETURN_OF_RECOVERY
// sets k_boostpower, k_speedboost, and k_accelboost to whatever we need it to be // sets k_boostpower, k_speedboost, and k_accelboost to whatever we need it to be
static void K_GetKartBoostPower(player_t *player) static void K_GetKartBoostPower(player_t *player)
{ {
#ifdef RETURN_OF_RECOVERY
const fixed_t maxrecoveryincrease = FRACUNIT/2;
const fixed_t recovery = FRACUNIT - ((9-player->kartweight) * maxrecoveryincrease / 8);
#endif // RETURN_OF_RECOVERY
fixed_t boostpower = FRACUNIT; fixed_t boostpower = FRACUNIT;
fixed_t speedboost = 0, accelboost = 0; fixed_t speedboost = 0, accelboost = 0;
UINT8 numboosts = 0; UINT8 numboosts = 0;
@ -2045,12 +2054,24 @@ static void K_GetKartBoostPower(player_t *player)
if (player->kartstuff[k_bananadrag] > TICRATE) if (player->kartstuff[k_bananadrag] > TICRATE)
boostpower = (4*boostpower)/5; boostpower = (4*boostpower)/5;
#ifdef RETURN_OF_RECOVERY
#define ADDBOOST(s,a) { \ #define ADDBOOST(s,a) { \
numboosts++; \ numboosts++; \
speedboost += (s) / numboosts; \ speedboost += FixedDiv(s, FRACUNIT + (recovery * numboosts-1)); \
accelboost += (a) / numboosts; \ accelboost += FixedDiv(a, FRACUNIT + (recovery * numboosts-1)); \
} }
#else
#define ADDBOOST(s,a) { \
numboosts++; \
speedboost += s / numboosts; \
accelboost += a / numboosts; \
}
#endif // RETURN_OF_RECOVERY
if (player->kartstuff[k_sneakertimer]) // Sneaker if (player->kartstuff[k_sneakertimer]) // Sneaker
{ {
UINT8 i; UINT8 i;
@ -2195,11 +2216,11 @@ UINT16 K_GetKartFlashing(player_t *player)
if (!player) if (!player)
return tics; return tics;
tics += (tics/8) * (player->kartspeed);
if (G_BattleGametype()) if (G_BattleGametype())
tics *= 2; tics *= 2;
tics += (flashingtics/8) * (player->kartspeed);
return tics; return tics;
} }