1
0
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:
ZehMatt
2017-10-07 17:46:27 +02:00
committed by Michael Steenbeek
parent 86031410c6
commit 19f9a9b755
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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