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

Fix #16572: Refactor error made in #15403

This commit is contained in:
Gymnasiast
2022-02-12 00:43:32 +01:00
parent 5a0be004de
commit 635a6507eb

View File

@@ -137,10 +137,10 @@ GameActions::Result TrackDesignAction::Execute() const
auto& objManager = OpenRCT2::GetContext()->GetObjectManager();
auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.vehicle_object);
if (entryIndex == OBJECT_ENTRY_INDEX_NULL)
if (entryIndex != OBJECT_ENTRY_INDEX_NULL)
{
// Force a fallback if the entry is not invented yet a td6 of it is selected,
// which can happen in select-by-track-type mode
// Force a fallback if the entry is not invented yet a track design using is selected.
// This can happen on rides with multiple vehicles where some have been invented and some havent.
if (!ride_entry_is_invented(entryIndex) && !gCheatsIgnoreResearchStatus)
{
entryIndex = OBJECT_ENTRY_INDEX_NULL;