From f281aa1a80cdc372af0669b6283b07e1e8738e64 Mon Sep 17 00:00:00 2001 From: Michael Stowe <33729757+mkstowe@users.noreply.github.com> Date: Fri, 24 Apr 2020 18:08:04 -0400 Subject: [PATCH] Fix #8571: Redundant comparison in Station.cpp --- src/openrct2/ride/Station.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openrct2/ride/Station.cpp b/src/openrct2/ride/Station.cpp index a6836f2b52..e754977522 100644 --- a/src/openrct2/ride/Station.cpp +++ b/src/openrct2/ride/Station.cpp @@ -96,7 +96,6 @@ static void ride_update_station_bumpercar(Ride* ride, StationIndex stationIndex) if (ride->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { int32_t dx = ride->time_limit * 32; - int32_t dl = dx & 0xFF; int32_t dh = (dx >> 8) & 0xFF; for (size_t i = 0; i < ride->num_vehicles; i++) { @@ -105,7 +104,7 @@ static void ride_update_station_bumpercar(Ride* ride, StationIndex stationIndex) continue; Vehicle* vehicle = GET_VEHICLE(vehicleSpriteIdx); - if (vehicle->var_CE < dh || (vehicle->var_CE < dh && vehicle->sub_state > dl)) + if (vehicle->var_CE < dh) continue; // End match