From 8bf42ea4f94077f8687b559be0fa1358d629c41e Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Wed, 22 Nov 2017 19:19:17 +0000 Subject: [PATCH] Modify how steam updates to simplify code. This will move steam in exactly the same way as the previous code but the code is easier to understand. Note on first load of a save that was made prior to this change there will be 1 tick of incorrect movement for steam. This is barrely noticeable. --- src/openrct2/world/sprite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openrct2/world/sprite.c b/src/openrct2/world/sprite.c index aef7462bd1..4e029dfc60 100644 --- a/src/openrct2/world/sprite.c +++ b/src/openrct2/world/sprite.c @@ -397,8 +397,9 @@ static void sprite_steam_particle_update(rct_steam_particle *steam) invalidate_sprite_2((rct_sprite*)steam); // Move up 1 z every 3 ticks (Starts after 4 ticks) - steam->time_to_move += 0x5555; - if (steam->time_to_move < 0x5555) { + steam->time_to_move++; + if (steam->time_to_move >= 4) { + steam->time_to_move = 1; sprite_move( steam->x, steam->y,