mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Use gamespeed multiplier checks for "hard" difficulty behavior (4th Gear compatibility)
This commit is contained in:
parent
f6835d5b79
commit
6c8db5bc0e
2 changed files with 9 additions and 2 deletions
|
|
@ -422,6 +422,13 @@ fixed_t K_GetKartGameSpeedScalar(SINT8 value)
|
|||
// Hard = 118.75%
|
||||
// Nightmare = 137.5% ?!?!
|
||||
|
||||
// WARNING: This value is used instead of directly checking game speed in some
|
||||
// cases, where hard difficulty breakpoints are needed, but compatibility with
|
||||
// the "4th Gear" cheat seemed relevant. Sorry about the weird indirection!
|
||||
// At the time of writing:
|
||||
// K_UpdateOffroad (G3+ double offroad penalty speed)
|
||||
// P_ButteredSlope (G1- Slope Assist)
|
||||
|
||||
if (cv_4thgear.value && !netgame && (!demo.playback || !demo.netgame) && !modeattacking)
|
||||
value = 3;
|
||||
|
||||
|
|
@ -1210,7 +1217,7 @@ static void K_UpdateOffroad(player_t *player)
|
|||
// If you are in offroad, a timer starts.
|
||||
if (offroadstrength)
|
||||
{
|
||||
UINT8 offramp = (gamespeed == KARTSPEED_HARD ? 2 : 1);
|
||||
UINT8 offramp = (K_GetKartGameSpeedScalar(gamespeed) > FRACUNIT ? 2 : 1);
|
||||
|
||||
if (player->offroad < offroadstrength)
|
||||
player->offroad += offroadstrength * offramp / TICRATE;
|
||||
|
|
|
|||
|
|
@ -1174,7 +1174,7 @@ void P_ButteredSlope(mobj_t *mo)
|
|||
// 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!)
|
||||
// Special exception for Tutorial because we're trying to teach slope mechanics there.
|
||||
if (gamespeed == KARTSPEED_EASY && gametype != GT_TUTORIAL)
|
||||
if (K_GetKartGameSpeedScalar(gamespeed) < FRACUNIT && gametype != GT_TUTORIAL)
|
||||
{
|
||||
// Same as above, but use facing angle:
|
||||
angle_t easyangle = mo->angle - mo->standingslope->xydirection;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue