From 610e2c66be226aa07b0cf8d139e91b8b1994e3f5 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 14 Jan 2023 18:11:46 -0800 Subject: [PATCH 1/2] Adjust Garden Top physics - 110% -> 150% top speed - no friction decrease if grinding - 250% -> 300% gravity when grinding (for slope sliding) - 275% -> 325% max boost when releasing grind - 60% minimum boost speed when relasing grind --- src/k_kart.c | 6 ++++-- src/p_mobj.c | 2 +- src/p_user.c | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 6debceecf..694425773 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3386,7 +3386,7 @@ fixed_t K_GetNewSpeed(player_t *player) if (player->curshield == KSHIELD_TOP) { - p_speed = 11 * p_speed / 10; + p_speed = 15 * p_speed / 10; } if (K_PlayerUsesBotMovement(player) == true && player->botvars.rubberband > 0) @@ -9873,7 +9873,9 @@ void K_AdjustPlayerFriction(player_t *player) player->mo->friction += ((FRACUNIT - prevfriction) / greasetics) * player->tiregrease; } - if (player->curshield == KSHIELD_TOP) + // Less friction on Top unless grinding + if (player->curshield == KSHIELD_TOP && + K_GetForwardMove(player) > 0) { player->mo->friction += 1024; } diff --git a/src/p_mobj.c b/src/p_mobj.c index b5bb16c45..778e65263 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1134,7 +1134,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) if (K_IsHoldingDownTop(mo->player)) { - gravityadd = (5*gravityadd)/2; + gravityadd *= 3; } else if (mo->player->fastfall != 0) { diff --git a/src/p_user.c b/src/p_user.c index c00991850..cf9beeb8e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2017,14 +2017,15 @@ static void P_3dMovement(player_t *player) if (onground && player->curshield == KSHIELD_TOP && (K_GetKartButtons(player) & BT_DRIFT) != BT_DRIFT && (player->oldcmd.buttons & BT_DRIFT)) { const fixed_t gmin = FRACUNIT/4; - const fixed_t gmax = 5*FRACUNIT/2; + const fixed_t gmax = 3*FRACUNIT; const fixed_t grindfactor = (gmax - gmin) / GARDENTOP_MAXGRINDTIME; const fixed_t grindscale = gmin + (player->topdriftheld * grindfactor); const fixed_t speed = R_PointToDist2(0, 0, player->mo->momx, player->mo->momy); + const fixed_t minspeed = 3 * K_GetKartSpeed(player, false, false) / 5; // 60% top speed - P_InstaThrust(player->mo, player->mo->angle, FixedMul(speed, grindscale)); + P_InstaThrust(player->mo, player->mo->angle, FixedMul(max(speed, minspeed), grindscale)); player->topdriftheld = 0;/* reset after release */ } From 8ff95af61dfe672a280b269b66ca39c74a0df0d7 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 14 Jan 2023 18:35:49 -0800 Subject: [PATCH 2/2] Disable Drop Dashing while on the Garden Top --- src/k_respawn.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/k_respawn.c b/src/k_respawn.c index 7d1207b10..873d00fd7 100644 --- a/src/k_respawn.c +++ b/src/k_respawn.c @@ -661,6 +661,42 @@ static void K_DropDashWait(player_t *player) } +/*-------------------------------------------------- + static boolean K_CanDropDash(player_t *player) + + Checks if you can use the Drop Dash maneuver. + + Input Arguments:- + player - Player to check. + + Return:- + Whether a Drop Dash should be allowed. +--------------------------------------------------*/ +static boolean K_CanDropDash(player_t *player) +{ + const UINT16 buttons = K_GetKartButtons(player); + + if (!(buttons & BT_ACCELERATE)) + { + return false; + } + + // Since we're letting players spin out on respawn, don't let them charge a dropdash in this state. (It wouldn't work anyway) + if (player->spinouttimer) + { + return false; + } + + // Garden Top is overpowered enough + if (player->curshield == KSHIELD_TOP) + { + return false; + } + + return true; +} + + /*-------------------------------------------------- static void K_HandleDropDash(player_t *player) @@ -699,7 +735,7 @@ static void K_HandleDropDash(player_t *player) // The old behavior was stupid and prone to accidental usage. // Let's rip off Mania instead, and turn this into a Drop Dash! - if ((buttons & BT_ACCELERATE) && !player->spinouttimer) // Since we're letting players spin out on respawn, don't let them charge a dropdash in this state. (It wouldn't work anyway) + if (K_CanDropDash(player)) { player->respawn.dropdash++; }