mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Merge pull request #13841 from Gymnasiast/fix/13236
Fix #13236: New ride type appears as new vehicle type in research
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
- Fix: [#9631, #10716] Banners drawing glitches when there are more than 32 on the screen at once.
|
- Fix: [#9631, #10716] Banners drawing glitches when there are more than 32 on the screen at once.
|
||||||
- Fix: [#12895] Mechanics are called to repair rides that have already been fixed.
|
- Fix: [#12895] Mechanics are called to repair rides that have already been fixed.
|
||||||
- Fix: [#13102] Underflow on height chart (Ride measurements).
|
- Fix: [#13102] Underflow on height chart (Ride measurements).
|
||||||
|
- Fix: [#13236] New ride type appears as new vehicle type in research.
|
||||||
- Fix: [#13257] Rides that are exactly the minimum objective length are not counted.
|
- Fix: [#13257] Rides that are exactly the minimum objective length are not counted.
|
||||||
- Fix: [#13334] Uninitialised variables in CustomTabDesc.
|
- Fix: [#13334] Uninitialised variables in CustomTabDesc.
|
||||||
- Fix: [#13342] Rename tabChange to onTabChange in WindowDesc interface.
|
- Fix: [#13342] Rename tabChange to onTabChange in WindowDesc interface.
|
||||||
|
|||||||
@@ -954,8 +954,6 @@ static void research_update_first_of_type(ResearchItem* researchItem)
|
|||||||
|
|
||||||
if (!_seenRideType[rideType])
|
if (!_seenRideType[rideType])
|
||||||
researchItem->flags |= RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE;
|
researchItem->flags |= RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE;
|
||||||
|
|
||||||
_seenRideType[rideType] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void research_mark_ride_type_as_seen(const ResearchItem& researchItem)
|
static void research_mark_ride_type_as_seen(const ResearchItem& researchItem)
|
||||||
@@ -989,7 +987,7 @@ void research_determine_first_of_type()
|
|||||||
if (gResearchLastItem.has_value() && !gResearchLastItem->IsNull() && researchItem.Equals(&gResearchLastItem.value()))
|
if (gResearchLastItem.has_value() && !gResearchLastItem->IsNull() && researchItem.Equals(&gResearchLastItem.value()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// The next research item is also present in gResearchItemsInvented, even though it isn't invented yet(!)
|
// The next research item is (sometimes?) also present in gResearchItemsInvented, even though it isn't invented yet(!)
|
||||||
if (gResearchNextItem.has_value() && !gResearchNextItem->IsNull() && researchItem.Equals(&gResearchNextItem.value()))
|
if (gResearchNextItem.has_value() && !gResearchNextItem->IsNull() && researchItem.Equals(&gResearchNextItem.value()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -1009,6 +1007,15 @@ void research_determine_first_of_type()
|
|||||||
|
|
||||||
for (auto& researchItem : gResearchItemsUninvented)
|
for (auto& researchItem : gResearchItemsUninvented)
|
||||||
{
|
{
|
||||||
|
// The next research item is (sometimes?) also present in gResearchItemsUninvented
|
||||||
|
if (gResearchNextItem.has_value() && !gResearchNextItem->IsNull() && researchItem.Equals(&gResearchNextItem.value()))
|
||||||
|
{
|
||||||
|
// Copy the "first of type" flag.
|
||||||
|
researchItem.flags = gResearchNextItem->flags;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
research_update_first_of_type(&researchItem);
|
research_update_first_of_type(&researchItem);
|
||||||
|
research_mark_ride_type_as_seen(researchItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user