mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-15 15:42:27 +00:00
Merge branch 'master' into less-bubbles
This commit is contained in:
commit
c614e9ee1f
2 changed files with 26 additions and 4 deletions
28
src/k_kart.c
28
src/k_kart.c
|
|
@ -2037,9 +2037,17 @@ static fixed_t K_FlameShieldDashVar(INT32 val)
|
|||
return (3*FRACUNIT/4) + (((val * FRACUNIT) / TICRATE) / 2);
|
||||
}
|
||||
|
||||
// Light weights have stronger boost stacking -- aka, better metabolism than heavies XD
|
||||
#define METABOLISM
|
||||
|
||||
// sets k_boostpower, k_speedboost, and k_accelboost to whatever we need it to be
|
||||
static void K_GetKartBoostPower(player_t *player)
|
||||
{
|
||||
#ifdef METABOLISM
|
||||
const fixed_t maxmetabolismincrease = FRACUNIT/2;
|
||||
const fixed_t metabolism = FRACUNIT - ((9-player->kartweight) * maxmetabolismincrease / 8);
|
||||
#endif // METABOLISM
|
||||
|
||||
fixed_t boostpower = FRACUNIT;
|
||||
fixed_t speedboost = 0, accelboost = 0;
|
||||
UINT8 numboosts = 0;
|
||||
|
|
@ -2057,12 +2065,24 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
if (player->kartstuff[k_bananadrag] > TICRATE)
|
||||
boostpower = (4*boostpower)/5;
|
||||
|
||||
#ifdef METABOLISM
|
||||
|
||||
#define ADDBOOST(s,a) { \
|
||||
numboosts++; \
|
||||
speedboost += (s) / numboosts; \
|
||||
accelboost += (a) / numboosts; \
|
||||
speedboost += FixedDiv(s, FRACUNIT + (metabolism * numboosts-1)); \
|
||||
accelboost += FixedDiv(a, FRACUNIT + (metabolism * numboosts-1)); \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define ADDBOOST(s,a) { \
|
||||
numboosts++; \
|
||||
speedboost += s / numboosts; \
|
||||
accelboost += a / numboosts; \
|
||||
}
|
||||
|
||||
#endif // METABOLISM
|
||||
|
||||
if (player->kartstuff[k_sneakertimer]) // Sneaker
|
||||
{
|
||||
UINT8 i;
|
||||
|
|
@ -2207,11 +2227,11 @@ UINT16 K_GetKartFlashing(player_t *player)
|
|||
if (!player)
|
||||
return tics;
|
||||
|
||||
tics += (tics/8) * (player->kartspeed);
|
||||
|
||||
if (G_BattleGametype())
|
||||
tics *= 2;
|
||||
|
||||
tics += (flashingtics/8) * (player->kartspeed);
|
||||
|
||||
return tics;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2271,6 +2271,8 @@ static void LoadMobjThinker(actionf_p1 thinker)
|
|||
mobj->colorized = READUINT8(save_p);
|
||||
if (diff2 & MD2_SHADOWSCALE)
|
||||
mobj->shadowscale = READFIXED(save_p);
|
||||
if (diff2 & MD2_DRAWFLAGS)
|
||||
mobj->drawflags = READUINT16(save_p);
|
||||
|
||||
if (diff & MD_REDFLAG)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue