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

This commit is contained in:
Gymnasiast committed 2020-07-17 00:19:49 +02:00
1 parent c6f0bb92a8
commit f596d8de58
3 files changed
+19 -1

No files matched your search

+2 -1
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);