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
This commit is contained in:
James R 2023-01-14 18:11:46 -08:00
parent cafe7603b8
commit 610e2c66be
3 changed files with 8 additions and 5 deletions

View file

@ -3386,7 +3386,7 @@ fixed_t K_GetNewSpeed(player_t *player)
if (player->curshield == KSHIELD_TOP) 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) 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; 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; player->mo->friction += 1024;
} }

View file

@ -1134,7 +1134,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
if (K_IsHoldingDownTop(mo->player)) if (K_IsHoldingDownTop(mo->player))
{ {
gravityadd = (5*gravityadd)/2; gravityadd *= 3;
} }
else if (mo->player->fastfall != 0) else if (mo->player->fastfall != 0)
{ {

View file

@ -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)) 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 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 grindfactor = (gmax - gmin) / GARDENTOP_MAXGRINDTIME;
const fixed_t grindscale = gmin + (player->topdriftheld * grindfactor); 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 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 */ player->topdriftheld = 0;/* reset after release */
} }