More podium physics tweaks for the new scale

- Normalize turning stats
- More friction
- Less acceleration
- Podium bots will go at a reduced speed when going towards a No Respawn waypoint, so they can calm down a bit before they get on their platform.
This commit is contained in:
Sally Coolatta 2023-03-02 19:17:58 -05:00
parent 170be982ea
commit 672d69c626
2 changed files with 22 additions and 8 deletions

View file

@ -1309,7 +1309,16 @@ static void K_BuildBotPodiumTiccmd(player_t *player, ticcmd_t *cmd)
return;
}
cmd->forwardmove = MAXPLMOVE;
if (K_GetWaypointIsSpawnpoint(player->currentwaypoint) == false)
{
// Hacky flag reuse: slow down before reaching your podium stand.
cmd->forwardmove = MAXPLMOVE * 3 / 4;
}
else
{
cmd->forwardmove = MAXPLMOVE;
}
cmd->buttons |= BT_ACCELERATE;
K_BotPodiumTurning(player, cmd);

View file

@ -3304,7 +3304,8 @@ fixed_t K_GetKartAccel(player_t *player)
if (K_PodiumSequence() == true)
{
stat = 4;
// Normalize to Metal's accel
stat = 1;
}
k_accel += 17 * stat; // 121 - 257
@ -8939,6 +8940,15 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
p_speed = min(currentSpeed, (p_maxspeed * 2));
}
if (K_PodiumSequence() == true)
{
// Normalize turning for podium
weightadjust = FixedDiv((p_maxspeed * 3), (p_maxspeed * 3) + (2 * FRACUNIT));
turnfixed = FixedMul(turnfixed, weightadjust);
turnfixed *= 2;
return (turnfixed / FRACUNIT);
}
weightadjust = FixedDiv((p_maxspeed * 3) - p_speed, (p_maxspeed * 3) + (player->kartweight * FRACUNIT));
if (K_PlayerUsesBotMovement(player))
@ -8946,11 +8956,6 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
turnfixed = FixedMul(turnfixed, 5*FRACUNIT/4); // Base increase to turning
}
if (K_PodiumSequence() == true)
{
turnfixed *= 2;
}
if (player->drift != 0 && P_IsObjectOnGround(player->mo))
{
fixed_t countersteer = FixedDiv(turnfixed, KART_FULLTURN*FRACUNIT);
@ -10054,7 +10059,7 @@ fixed_t K_PlayerBaseFriction(fixed_t original)
if (K_PodiumSequence() == true)
{
frict -= FRACUNIT >> 3;
frict -= FRACUNIT >> 4;
}
if (frict > FRACUNIT) { frict = FRACUNIT; }