mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
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:
commit
57a3aef590
2 changed files with 17 additions and 7 deletions
20
src/k_kart.c
20
src/k_kart.c
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue