mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #13236: New ride type appears as new vehicle type in research
This commit is contained in:
parent
5cd3014334
commit
4fcc86f990
|
@ -989,7 +989,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 +1009,14 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue