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.
This commit is contained in:
Duncan 2019-03-02 11:51:28 +00:00 committed by Michael Steenbeek
parent e776faee97
commit 46ae0934f8
1 changed files with 1 additions and 1 deletions

View File

@ -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<GameActionResult>(GA_ERROR::INVALID_PARAMETERS, errTitle);