mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-31 05:20:51 +00:00
Account for scale when getting topspeed for accel code
This commit is contained in:
parent
a660c65c3f
commit
c6814943ec
2 changed files with 8 additions and 5 deletions
|
@ -1094,8 +1094,8 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
|
|||
k_speed += player->kartspeed*3; // 153 - 177
|
||||
|
||||
if (doboostpower)
|
||||
return FixedMul(FixedMul(k_speed<<14, g_cc), K_GetKartBoostPower(player, true));
|
||||
return FixedMul(k_speed<<14, g_cc);
|
||||
return FixedMul(FixedMul(FixedMul(k_speed<<14, g_cc), K_GetKartBoostPower(player, true)), player->mo->scale);
|
||||
return FixedMul(FixedMul(k_speed<<14, g_cc), player->mo->scale);
|
||||
}
|
||||
|
||||
static fixed_t K_GetKartAccel(player_t *player)
|
||||
|
|
|
@ -4774,7 +4774,8 @@ static void P_3dMovement(player_t *player)
|
|||
movepushforward = 0;
|
||||
}
|
||||
|
||||
movepushforward = FixedMul(movepushforward, player->mo->scale);
|
||||
// don't need to account for scale here with kart accel code
|
||||
//movepushforward = FixedMul(movepushforward, player->mo->scale);
|
||||
|
||||
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
|
||||
movepushforward = FixedMul(movepushforward, player->mo->movefactor);
|
||||
|
@ -4838,7 +4839,8 @@ static void P_3dMovement(player_t *player)
|
|||
|
||||
movepushsideangle = controldirection;
|
||||
|
||||
movepushforward = FixedMul(movepushforward, player->mo->scale);
|
||||
// don't need to account for scale here with kart accel code
|
||||
//movepushforward = FixedMul(movepushforward, player->mo->scale);
|
||||
|
||||
//if (mforward && cmd->forwardmove < 0) // SRB2kart - braking isn't instant
|
||||
// movepushforward /= 32;
|
||||
|
@ -4878,7 +4880,8 @@ static void P_3dMovement(player_t *player)
|
|||
}
|
||||
|
||||
// Finally move the player now that his speed/direction has been decided.
|
||||
movepushside = FixedMul(movepushside, player->mo->scale);
|
||||
// don't need to account for scale here with kart accel code
|
||||
//movepushside = FixedMul(movepushside, player->mo->scale);
|
||||
|
||||
#ifdef ESLOPE
|
||||
totalthrust.x += P_ReturnThrustX(player->mo, movepushsideangle, movepushside);
|
||||
|
|
Loading…
Reference in a new issue