1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Refactor vehicle_paint to move rideEntry to the inner scope (#13695)

This commit is contained in:
skdltmxn
2021-01-05 02:43:22 +09:00
committed by GitHub
parent f8c0aea9e2
commit 81e7e29eb5

View File

@@ -3133,7 +3133,6 @@ void vehicle_visual_default(
*/
void vehicle_paint(paint_session* session, const Vehicle* vehicle, int32_t imageDirection)
{
rct_ride_entry* rideEntry = nullptr;
const rct_ride_entry_vehicle* vehicleEntry;
int32_t x = vehicle->x;
@@ -3153,7 +3152,7 @@ void vehicle_paint(paint_session* session, const Vehicle* vehicle, int32_t image
}
else
{
rideEntry = vehicle->GetRideEntry();
auto rideEntry = vehicle->GetRideEntry();
if (rideEntry == nullptr)
{
return;