Merge branch 'egg-fast-drift' into 'master'

Give heavy-accel a bonus to drift boosts

See merge request KartKrew/Kart!648
This commit is contained in:
Sal 2022-08-24 07:34:34 +00:00
commit 57a3aef590
2 changed files with 17 additions and 7 deletions

View file

@ -3089,14 +3089,22 @@ static void K_GetKartBoostPower(player_t *player)
if (player->driftboost) // Drift Boost
{
if (player->strongdriftboost) // Purple/Rainbow drift boost
// Rebuff Eggman's stat block corner
const INT32 heavyAccel = (player->kartweight - 1) + (9 - player->kartspeed);
const fixed_t heavyAccelBonus = FRACUNIT + ((heavyAccel * maxmetabolismincrease * 2) / 16);
fixed_t driftSpeed = FRACUNIT/4; // 25% base
if (player->strongdriftboost > 0)
{
ADDBOOST(FRACUNIT/3, 4*FRACUNIT, 0); // + 33% top speed, + 400% acceleration, +0% handling
}
else
{
ADDBOOST(FRACUNIT/4, 4*FRACUNIT, 0); // + 25% top speed, + 400% acceleration, +0% handling
// Purple/Rainbow drift boost
driftSpeed = FixedMul(driftSpeed, 4*FRACUNIT/3); // 25% -> 33%
}
// Bottom-left bonus
driftSpeed = FixedMul(driftSpeed, heavyAccelBonus);
ADDBOOST(driftSpeed, 4*FRACUNIT, 0); // + variable top speed, + 400% acceleration, +0% handling
}
if (player->trickboost) // Trick pannel up-boost

View file

@ -4076,8 +4076,10 @@ sector_t *P_MobjTouchingSectorSpecial(mobj_t *mo, INT32 section, INT32 number, b
msecnode_t *node;
ffloor_t *rover;
if (!mo)
if (mo == NULL || P_MobjWasRemoved(mo) == true)
{
return NULL;
}
// Check default case first
if (GETSECSPECIAL(mo->subsector->sector->special, section) == number)