Merge pull request #10107 from tupaschoal/fix-powered-not-passing-station

Fix #10106: Reset number of circuits if unsupported
This commit is contained in:
Duncan 2019-10-19 09:54:27 +02:00 committed by GitHub
commit a491543e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 1 deletions

View File

@ -30,6 +30,7 @@
- Fix: [#9994] Game action tick collision during server connect and map load.
- Fix: [#10017] Ghost elements influencing ride excitement.
- Fix: [#10036] Do not allocate large chunks of memory for save file classification.
- Fix: [#10106]: Ride circuits should not be used for modes that do not support it.
- Improved: [#9466] Add the rain weather effect to the OpenGL renderer.
- Improved: [#9987] Minimum load rounding.

View File

@ -181,6 +181,7 @@ public:
ride->mode = _value;
ride->UpdateMaxVehicles();
ride->UpdateNumberOfCircuits();
break;
case RideSetSetting::Departure:
ride->depart_flags = _value;

View File

@ -34,7 +34,7 @@
// This string 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 "19"
#define NETWORK_STREAM_VERSION "20"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static Peep* _pickup_peep = nullptr;

View File

@ -6864,6 +6864,14 @@ void Ride::UpdateMaxVehicles()
}
}
void Ride::UpdateNumberOfCircuits()
{
if (!CanHaveMultipleCircuits())
{
num_circuits = 1;
}
}
void Ride::SetRideEntry(int32_t rideEntry)
{
auto colour = ride_get_unused_preset_vehicle_colour(rideEntry);

View File

@ -408,6 +408,7 @@ public:
void SetNumVehicles(int32_t numVehicles);
void SetNumCarsPerVehicle(int32_t numCarsPerVehicle);
void UpdateMaxVehicles();
void UpdateNumberOfCircuits();
bool HasSpinningTunnel() const;
bool HasWaterSplash() const;