mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 12:03:07 +01:00
Fix Car.rideObject from overflowing with more than 256 ride types
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
- Fix: [#16542] “Same price throughout park” status not correctly imported for RCT1 saves.
|
||||
- Fix: [#16572] Crash when trying to place track designs.
|
||||
- Fix: [#16591] [Plugin] setInterval and setTimeout is not disposed when map unloads.
|
||||
- Fix: [#16711] [Plugin] Car.rideObject overflowing with more than 256 ride types.
|
||||
- Fix: [objects#165] Glitch when Bengal Tiger Cars go through a corner.
|
||||
|
||||
0.3.5.1 (2021-11-21)
|
||||
|
||||
@@ -90,12 +90,12 @@ namespace OpenRCT2::Scripting
|
||||
return ::GetEntity<Vehicle>(_id);
|
||||
}
|
||||
|
||||
uint8_t ScVehicle::rideObject_get() const
|
||||
ObjectEntryIndex ScVehicle::rideObject_get() const
|
||||
{
|
||||
auto vehicle = GetVehicle();
|
||||
return vehicle != nullptr ? vehicle->ride_subtype : 0;
|
||||
}
|
||||
void ScVehicle::rideObject_set(uint8_t value)
|
||||
void ScVehicle::rideObject_set(ObjectEntryIndex value)
|
||||
{
|
||||
ThrowIfGameStateNotMutable();
|
||||
auto vehicle = GetVehicle();
|
||||
|
||||
@@ -28,8 +28,8 @@ namespace OpenRCT2::Scripting
|
||||
private:
|
||||
Vehicle* GetVehicle() const;
|
||||
|
||||
uint8_t rideObject_get() const;
|
||||
void rideObject_set(uint8_t value);
|
||||
ObjectEntryIndex rideObject_get() const;
|
||||
void rideObject_set(ObjectEntryIndex value);
|
||||
|
||||
uint8_t vehicleObject_get() const;
|
||||
void vehicleObject_set(uint8_t value);
|
||||
|
||||
Reference in New Issue
Block a user