From 69221606ef212a595dfa9f022dac1eecf9a73734 Mon Sep 17 00:00:00 2001 From: Helio Santos Date: Wed, 8 Jul 2020 15:07:00 -0700 Subject: [PATCH] Part of #12165: Use CoordsXYZ on steam_particle_create Updated steam_particle_create function prototype to use CoordsXYZ. Updated caller(s) accordingly. --- src/openrct2/ride/Vehicle.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index f6773160a9..9eea88950a 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -7173,10 +7173,10 @@ void Vehicle::UpdateSpinningCar() * * rct2: 0x006734B2 */ -static void steam_particle_create(int16_t x, int16_t y, int16_t z) +static void steam_particle_create(const CoordsXYZ& coords) { - auto surfaceElement = map_get_surface_element_at(CoordsXY{ x, y }); - if (surfaceElement != nullptr && z > surfaceElement->GetBaseZ()) + auto surfaceElement = map_get_surface_element_at(coords); + if (surfaceElement != nullptr && coords.z > surfaceElement->GetBaseZ()) { SteamParticle* steam = &create_sprite(SPRITE_IDENTIFIER_MISC)->steam_particle; if (steam == nullptr) @@ -7189,7 +7189,7 @@ static void steam_particle_create(int16_t x, int16_t y, int16_t z) steam->type = SPRITE_MISC_STEAM_PARTICLE; steam->frame = 256; steam->time_to_move = 0; - steam->MoveTo({ x, y, z }); + steam->MoveTo(coords); } } @@ -7243,7 +7243,7 @@ void Vehicle::UpdateAdditionalAnimation() }(); int32_t directionIndex = sprite_direction >> 1; auto offset = SteamParticleOffsets[typeIndex][directionIndex]; - steam_particle_create(x + offset.x, y + offset.y, z + offset.z); + steam_particle_create({ x + offset.x, y + offset.y, z + offset.z }); } } }