le funny banan drag jumpy

This commit is contained in:
Alug committed 2025-01-08 18:34:54 +01:00
1 parent f168c2f8c4
commit e70342fc19
1 file changed
+10
+10
View File
@@ -4821,6 +4821,16 @@ static void K_MoveHeldObjects(player_t *player)
targz -= 8*(2*FRACUNIT)/7;
}*/
cur->spriteyoffset = 0;
if (P_IsObjectOnGround(player->mo) && player->speed > 0 && player->kartstuff[k_bananadrag] > TICRATE
&& M_RandomChance(min(FRACUNIT/2, FixedDiv(player->speed, K_GetKartSpeed(player, false))/2)))
{
if (leveltime & 1)
cur->spriteyoffset += 8*(2*FRACUNIT)/7;
else
cur->spriteyoffset -= 8*(2*FRACUNIT)/7;
}
if (speed > dist)
P_InstaThrust(cur, cur->angle, speed-dist);