Fix Flameshield in mapobjectscale maps.

FixedMul instead of FixedDiv
This commit is contained in:
Sryder 2020-07-09 17:54:28 +01:00
parent e81c192a9f
commit c6c81c7fab

View file

@ -2098,7 +2098,7 @@ fixed_t K_GetKartAccel(player_t *player)
//k_accel += 3 * (9 - kartspeed); // 36 - 60
k_accel += 4 * (9 - kartspeed); // 32 - 64
if (K_PlayerUsesBotMovement(player))
{
// Rubberbanding acceleration is waekened since it makes hits feel more meaningful
@ -4004,7 +4004,7 @@ void K_DoSneaker(player_t *player, INT32 type)
{
player->pflags |= PF_ATTACKDOWN;
K_PlayBoostTaunt(player->mo);
}
player->kartstuff[k_sneakertimer] = sneakertime;
@ -6679,7 +6679,7 @@ static INT32 K_FlameShieldMax(player_t *player)
}
disttofinish = player->distancetofinish - disttofinish;
distv = FixedDiv(distv * FRACUNIT, mapobjectscale) / FRACUNIT;
distv = FixedMul(distv * FRACUNIT, mapobjectscale) / FRACUNIT;
return min(16, 1 + (disttofinish / distv));
}
@ -10025,7 +10025,7 @@ static void K_drawKartNameTags(void)
{
bary += (vid.height - (BASEVIDHEIGHT * vid.dupy)) / 2;
}
// Lat: 10/06/2020: colormap can be NULL on the frame you join a game, just arbitrarily use palette indexes 31 and 0 instead of whatever the colormap would give us instead to avoid crashes.
V_DrawFill(barx, bary, barw, (3 * vid.dupy), (colormap ? colormap[31] : 31)|V_NOSCALESTART);
V_DrawFill(barx, bary + vid.dupy, barw, vid.dupy, (colormap ? colormap[0] : 0)|V_NOSCALESTART);