+10% more effective top speed stat for all players, instead of just bots

This commit is contained in:
Sally Coolatta 2021-01-30 20:46:34 -05:00
parent b19c8a43c7
commit 6eb7c6a9a9
2 changed files with 15 additions and 14 deletions

View file

@ -475,14 +475,22 @@ fixed_t K_BotFrictionRubberband(player_t *player, fixed_t frict)
{
fixed_t rubberband = K_BotRubberband(player) - FRACUNIT;
fixed_t newfrict;
fixed_t frictionRatio;
if (rubberband <= 0)
{
// Never get stronger than normal friction
// Never get weaker than normal friction
return frict;
}
newfrict = FixedDiv(frict, FRACUNIT + (rubberband / 2));
newfrict = FixedDiv(ORIG_FRICTION, FRACUNIT + (rubberband / 2));
if (frict != ORIG_FRICTION)
{
// Adjust for non-ORIG_FRICTION values
frictionRatio = FixedDiv(frict, ORIG_FRICTION);
newfrict = FixedMul(newfrict, frictionRatio);
}
if (newfrict < 0)
newfrict = 0;

View file

@ -2183,10 +2183,10 @@ fixed_t K_GetKartSpeedFromStat(UINT8 kartspeed)
{
const fixed_t xspd = (3*FRACUNIT)/64;
fixed_t g_cc = K_GetKartGameSpeedScalar(gamespeed) + xspd;
fixed_t k_speed = 150;
fixed_t k_speed = 144;
fixed_t finalspeed;
k_speed += kartspeed*3; // 153 - 177
k_speed += kartspeed*6; // 150 - 198
finalspeed = FixedMul(k_speed<<14, g_cc);
return finalspeed;
@ -2204,17 +2204,10 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
finalspeed = FixedMul(finalspeed, FRACUNIT + (sphereAdd * player->spheres));
}
if (K_PlayerUsesBotMovement(player))
if (K_PlayerUsesBotMovement(player) && player->botvars.rival == true)
{
// Give top speed a buff for bots, since it's a fairly weak stat without drifting
fixed_t speedmul = ((player->kartspeed-1) * FRACUNIT / 8) / 10; // +10% for speed 9
if (player->botvars.rival == true)
{
speedmul += FRACUNIT/10; // +10% for rival
}
finalspeed = FixedMul(finalspeed, FRACUNIT + speedmul);
// +10% top speed for the rival
finalspeed = FixedMul(finalspeed, 11*FRACUNIT/10);
}
if (player->mo && !P_MobjWasRemoved(player->mo))