1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Limit track design object lookup to ride types where it's needed

This commit is contained in:
Gymnasiast
2020-06-30 10:48:11 +02:00
parent c6f0bb92a8
commit f596d8de58
3 changed files with 19 additions and 1 deletions

View File

@@ -81,7 +81,8 @@ public:
auto td6 = track_design_open(path.c_str());
if (td6 != nullptr)
{
ObjectEntryIndex rideType = RIDE_TYPE_NULL;
ObjectEntryIndex rideType = td6->type;
if (RCT2RideTypeNeedsConversion(td6->type))
{
std::scoped_lock<std::mutex> lock(_objectLookupMutex);
auto* rawObject = object_repository_load_object(&td6->vehicle_object);