mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'easy-tuneup' into 'master'
Hill-climb assist for Easy/Battle See merge request KartKrew/Kart!1810
This commit is contained in:
commit
022c9926e8
1 changed files with 22 additions and 0 deletions
|
|
@ -1171,6 +1171,28 @@ void P_ButteredSlope(mobj_t *mo)
|
||||||
// Make relative to game speed
|
// Make relative to game speed
|
||||||
mult = FixedMul(mult, gameSpeed);
|
mult = FixedMul(mult, gameSpeed);
|
||||||
|
|
||||||
|
// Easy / Battle: SUPER NERF slope climbs, so that they're usually possible without resources.
|
||||||
|
// (New players suck at budgeting, and may not remember they have spindash / rings at all!)
|
||||||
|
if (gamespeed == KARTSPEED_EASY)
|
||||||
|
{
|
||||||
|
// Same as above, but use facing angle:
|
||||||
|
angle_t easyangle = mo->angle - mo->standingslope->xydirection;
|
||||||
|
if (P_MobjFlip(mo) * mo->standingslope->zdelta < 0)
|
||||||
|
{
|
||||||
|
easyangle ^= ANGLE_180;
|
||||||
|
}
|
||||||
|
fixed_t mult2 = FINECOSINE(easyangle >> ANGLETOFINESHIFT);
|
||||||
|
mult2 = FixedMul(mult2, gameSpeed);
|
||||||
|
|
||||||
|
// Prefer the modifier that helps us go where we're going.
|
||||||
|
if (mult2 < mult)
|
||||||
|
mult = mult2;
|
||||||
|
|
||||||
|
// And if we're staring down a slope, believe in ourself really hard and climb it anyway.
|
||||||
|
if (mult < 0)
|
||||||
|
mult = 8 * mult / 5;
|
||||||
|
}
|
||||||
|
|
||||||
mult = FRACUNIT + (FRACUNIT + mult)*4/3;
|
mult = FRACUNIT + (FRACUNIT + mult)*4/3;
|
||||||
thrust = FixedMul(thrust, mult);
|
thrust = FixedMul(thrust, mult);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue