mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Fix #6394: RideCreateAction not working with empty colour presets.
This commit is contained in:
committed by
Michael Steenbeek
parent
86031410c6
commit
19f9a9b755
@@ -99,8 +99,8 @@ public:
|
||||
|
||||
rct_ride_entry *rideEntry = get_ride_entry(rideEntryIndex);
|
||||
vehicle_colour_preset_list *presetList = rideEntry->vehicle_preset_list;
|
||||
if ((presetList->count == 255 && _colour2 != 255) ||
|
||||
(presetList->count != 255 && _colour2 >= presetList->count))
|
||||
if ((presetList->count > 0 && presetList->count != 255) &&
|
||||
_colour2 >= presetList->count)
|
||||
{
|
||||
// FIXME: Add new error string.
|
||||
return std::make_unique<RideCreateGameActionResult>(GA_ERROR::INVALID_PARAMETERS, STR_INVALID_RIDE_TYPE);
|
||||
|
||||
@@ -51,7 +51,7 @@ typedef struct GameAction GameAction;
|
||||
// This define specifies which version of network stream current build uses.
|
||||
// It is used for making sure only compatible builds get connected, even within
|
||||
// single OpenRCT2 version.
|
||||
#define NETWORK_STREAM_VERSION "7"
|
||||
#define NETWORK_STREAM_VERSION "8"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user