From 39162b8f8e73b1bde1ba74898f13af15b2944ad1 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 17 Jan 2021 19:33:05 +0100 Subject: [PATCH] Remove 2 occurrences of regs.ebx --- src/openrct2/ride/Vehicle.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index bb78071070..4cee2b3376 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -8633,29 +8633,29 @@ loc_6DBA33:; auto loc = TrackLocation + CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + RideTypeDescriptors[curRide->type].Heights.VehicleZOffset }; - regs.ebx = 0; + uint8_t remainingDistanceFlags = 0; if (loc.x != unk_F64E20.x) { - regs.ebx |= 1; + remainingDistanceFlags |= 1; } if (loc.y != unk_F64E20.y) { - regs.ebx |= 2; + remainingDistanceFlags |= 2; } if (loc.z != unk_F64E20.z) { - regs.ebx |= 4; + remainingDistanceFlags |= 4; } - remaining_distance += dword_9A2930[regs.ebx]; + remaining_distance += dword_9A2930[remainingDistanceFlags]; unk_F64E20 = loc; sprite_direction = moveInfo->direction; bank_rotation = moveInfo->bank_rotation; regs.ebx = moveInfo->vehicle_sprite_type; - vehicle_sprite_type = regs.bl; + vehicle_sprite_type = moveInfo->vehicle_sprite_type; moveInfoVehicleSpriteType = moveInfo->vehicle_sprite_type; - if ((vehicleEntry->flags & VEHICLE_ENTRY_FLAG_25) && regs.bl != 0) + if ((vehicleEntry->flags & VEHICLE_ENTRY_FLAG_25) && vehicle_sprite_type != 0) { SwingSprite = 0; SwingPosition = 0;