1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix #20907: RCT1/AA scenarios use the 4-across train for the Inverted RC (#21303)

This commit is contained in:
Michael Steenbeek
2024-02-05 00:39:52 +01:00
committed by GitHub
parent f89dbf0d15
commit 9efe25c11c
5 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
0.4.9 (in development)
------------------------------------------------------------------------
- Fix: [#20907] RCT1/AA scenarios use the 4-across train for the Inverted Roller Coaster.
0.4.8 (2024-02-04)
------------------------------------------------------------------------

View File

@@ -606,7 +606,7 @@ namespace RCT1
if (_rideTypeToRideEntryMap[EnumValue(rideType)] == OBJECT_ENTRY_INDEX_NULL)
{
auto entryName = RCT1::GetRideTypeObject(rideType);
auto entryName = RCT1::GetRideTypeObject(rideType, _gameVersion == FILE_VERSION_RCT1_LL);
if (!entryName.empty())
{
auto entryIndex = _rideEntries.GetOrAddEntry(entryName);

View File

@@ -136,11 +136,10 @@ namespace RCT1
td->ride_mode = RideMode::PoweredLaunch;
}
// Convert RCT1 vehicle type to RCT2 vehicle type. Initialise with a string consisting of 8 spaces.
std::string_view vehicleObject;
if (td4Base.Type == RideType::HedgeMaze)
{
vehicleObject = RCT1::GetRideTypeObject(td4Base.Type);
vehicleObject = RCT1::GetRideTypeObject(td4Base.Type, false);
}
else
{

View File

@@ -696,8 +696,12 @@ namespace RCT1
return map[vehicleSubEntry];
}
std::string_view GetRideTypeObject(RideType rideType)
std::string_view GetRideTypeObject(RideType rideType, bool isLL)
{
if (rideType == RideType::InvertedRollerCoaster && !isLL) {
return "rct1.ride.inverted_trains";
}
static constexpr const char * map[] =
{
"rct1.ride.wooden_rc_trains", // RCT1_RIDE_TYPE_WOODEN_ROLLER_COASTER

View File

@@ -34,7 +34,7 @@ namespace RCT1
uint8_t NormalisePathAddition(uint8_t pathAdditionType);
uint8_t GetVehicleSubEntryIndex(uint8_t rct1VehicleType, uint8_t vehicleSubEntry);
std::string_view GetRideTypeObject(RideType rideType);
std::string_view GetRideTypeObject(RideType rideType, bool isLL);
std::string_view GetVehicleObject(uint8_t vehicleType);
std::string_view GetSmallSceneryObject(uint8_t smallSceneryType);
std::string_view GetLargeSceneryObject(uint8_t largeSceneryType);