1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 22:13:07 +01:00

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.
This commit is contained in:
duncanspumpkin
2017-11-22 19:19:17 +00:00
parent 0afc0eba5e
commit 8bf42ea4f9

View File

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