diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index a04eef3357..ce6e706867 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -715,7 +715,7 @@ void Guest::Tick128UpdateGuest(int32_t index) audio_play_sound_at_location(SoundId::Crash, { x, y, z }); sprite_misc_explosion_cloud_create({ x, y, z + 16 }); - sprite_misc_explosion_flare_create(x, y, z + 16); + sprite_misc_explosion_flare_create({ x, y, z + 16 }); Remove(); return; diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index e30dc71811..8abca3861d 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -5295,7 +5295,7 @@ void Vehicle::CrashOnLand() audio_play_sound_at_location(SoundId::Crash, { x, y, z }); sprite_misc_explosion_cloud_create({ x, y, z }); - sprite_misc_explosion_flare_create(x, y, z); + sprite_misc_explosion_flare_create({ x, y, z }); uint8_t numParticles = std::min(sprite_width, static_cast(7)); diff --git a/src/openrct2/world/Sprite.cpp b/src/openrct2/world/Sprite.cpp index b4f785563f..b2d6b989c7 100644 --- a/src/openrct2/world/Sprite.cpp +++ b/src/openrct2/world/Sprite.cpp @@ -554,7 +554,7 @@ static void sprite_misc_explosion_cloud_update(rct_sprite* sprite) * * rct2: 0x0067366B */ -void sprite_misc_explosion_flare_create(int32_t x, int32_t y, int32_t z) +void sprite_misc_explosion_flare_create(const CoordsXYZ& flarePos) { SpriteGeneric* sprite = &create_sprite(SPRITE_IDENTIFIER_MISC)->generic; if (sprite != nullptr) @@ -563,7 +563,7 @@ void sprite_misc_explosion_flare_create(int32_t x, int32_t y, int32_t z) sprite->sprite_height_negative = 85; sprite->sprite_height_positive = 8; sprite->sprite_identifier = SPRITE_IDENTIFIER_MISC; - sprite->MoveTo({ x, y, z + 4 }); + sprite->MoveTo(flarePos + CoordsXYZ{ 0, 0, 4 }); sprite->type = SPRITE_MISC_EXPLOSION_FLARE; sprite->frame = 0; } diff --git a/src/openrct2/world/Sprite.h b/src/openrct2/world/Sprite.h index 1ffcf1c4e9..3d63c51c63 100644 --- a/src/openrct2/world/Sprite.h +++ b/src/openrct2/world/Sprite.h @@ -223,7 +223,7 @@ void litter_create(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t t void litter_remove_at(int32_t x, int32_t y, int32_t z); uint16_t remove_floating_sprites(); void sprite_misc_explosion_cloud_create(const CoordsXYZ& cloudPos); -void sprite_misc_explosion_flare_create(int32_t x, int32_t y, int32_t z); +void sprite_misc_explosion_flare_create(const CoordsXYZ& flarePos); uint16_t sprite_get_first_in_quadrant(int32_t x, int32_t y); void sprite_position_tween_store_a(); void sprite_position_tween_store_b();