From 089cffd900c7a9fcf1cdccad5416ddc8e60d3f42 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Wed, 22 Jul 2020 18:21:50 -0400 Subject: [PATCH 1/3] 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. --- src/k_kart.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 8c0baac04..748ae4446 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2025,9 +2025,18 @@ static fixed_t K_FlameShieldDashVar(INT32 val) 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 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 speedboost = 0, accelboost = 0; UINT8 numboosts = 0; @@ -2045,12 +2054,24 @@ static void K_GetKartBoostPower(player_t *player) if (player->kartstuff[k_bananadrag] > TICRATE) boostpower = (4*boostpower)/5; +#ifdef RETURN_OF_RECOVERY + #define ADDBOOST(s,a) { \ numboosts++; \ - speedboost += (s) / numboosts; \ - accelboost += (a) / numboosts; \ + speedboost += FixedDiv(s, FRACUNIT + (recovery * numboosts-1)); \ + 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 { UINT8 i; @@ -2195,11 +2216,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; } From c942390745fabf9874f13ce15a39e8e98e2723c9 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Wed, 22 Jul 2020 18:33:48 -0400 Subject: [PATCH 2/3] Rename to metabolism because it's funnier & more accurate to what it does :XD: --- src/k_kart.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 748ae4446..188006876 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2025,17 +2025,16 @@ static fixed_t K_FlameShieldDashVar(INT32 val) return (3*FRACUNIT/4) + (((val * FRACUNIT) / TICRATE) / 2); } -// GAME OVER -// RETURN OF THE RECOVERY STAT FROM KARTZ -#define RETURN_OF_RECOVERY +// 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 RETURN_OF_RECOVERY - const fixed_t maxrecoveryincrease = FRACUNIT/2; - const fixed_t recovery = FRACUNIT - ((9-player->kartweight) * maxrecoveryincrease / 8); -#endif // RETURN_OF_RECOVERY +#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; @@ -2054,12 +2053,12 @@ static void K_GetKartBoostPower(player_t *player) if (player->kartstuff[k_bananadrag] > TICRATE) boostpower = (4*boostpower)/5; -#ifdef RETURN_OF_RECOVERY +#ifdef METABOLISM #define ADDBOOST(s,a) { \ numboosts++; \ - speedboost += FixedDiv(s, FRACUNIT + (recovery * numboosts-1)); \ - accelboost += FixedDiv(a, FRACUNIT + (recovery * numboosts-1)); \ + speedboost += FixedDiv(s, FRACUNIT + (metabolism * numboosts-1)); \ + accelboost += FixedDiv(a, FRACUNIT + (metabolism * numboosts-1)); \ } #else @@ -2070,7 +2069,7 @@ static void K_GetKartBoostPower(player_t *player) accelboost += a / numboosts; \ } -#endif // RETURN_OF_RECOVERY +#endif // METABOLISM if (player->kartstuff[k_sneakertimer]) // Sneaker { From 3800603243a9183758e7420ae15f938b1a1a80ec Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Wed, 22 Jul 2020 23:49:24 -0400 Subject: [PATCH 3/3] Bruhther moment --- src/p_saveg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_saveg.c b/src/p_saveg.c index 5239837b4..82affdd4b 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -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) {