From 46ae0934f86a66445a2c07b57e803d23397584bb Mon Sep 17 00:00:00 2001 From: Duncan Date: Sat, 2 Mar 2019 11:51:28 +0000 Subject: [PATCH] Fix #8809. Check for valid colours ignored special cases (#8813) Due to the special cases the colour check would fail and this would mean that the ride type could not be changed. 255 and 0 are both used to indicate that the ride should use different colours for each train. --- src/openrct2/actions/RideSetVehiclesAction.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/actions/RideSetVehiclesAction.hpp b/src/openrct2/actions/RideSetVehiclesAction.hpp index 94c6dfd13e..5af7cb2309 100644 --- a/src/openrct2/actions/RideSetVehiclesAction.hpp +++ b/src/openrct2/actions/RideSetVehiclesAction.hpp @@ -118,7 +118,7 @@ public: // Validate preset vehicle_colour_preset_list* presetList = rideEntry->vehicle_preset_list; - if (_colour >= presetList->count) + if (_colour >= presetList->count && _colour != 255 && _colour != 0) { log_error("Unknown vehicle colour preset. colour = %d", _colour); return std::make_unique(GA_ERROR::INVALID_PARAMETERS, errTitle);