Skip to content

Commit

Permalink
Fix OpenRCT2#20907: RCT1/AA scenarios use the 4-across train for the …
Browse files Browse the repository at this point in the history
…Inverted RC
  • Loading branch information
Gymnasiast committed Feb 4, 2024
1 parent f89dbf0 commit 43e6121
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
@@ -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)
------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/rct1/S4Importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions src/openrct2/rct1/T4Importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 5 additions & 1 deletion src/openrct2/rct1/Tables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/rct1/Tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 43e6121

Please sign in to comment.