Account for scale when getting topspeed for accel code

This commit is contained in:
Sryder 2017-03-10 02:59:16 +00:00
parent a660c65c3f
commit c6814943ec
2 changed files with 8 additions and 5 deletions

View file

@ -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)

View file

@ -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);