mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 06:23:04 +01:00
Use correct count of research items when importing park
Co-authored-by: Hielke Morsink <Broxzier@users.noreply.github.com> Co-authored-by: Michael Steenbeek <Gymnasiast@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
353c02b596
commit
d8ffec0ed7
@@ -919,23 +919,22 @@ public:
|
||||
void ImportResearchList()
|
||||
{
|
||||
bool invented = true;
|
||||
for (size_t i = 0; i < sizeof(_s6.research_items); i++)
|
||||
for (const auto& researchItem : _s6.research_items)
|
||||
{
|
||||
if (_s6.research_items[i].IsInventedEndMarker())
|
||||
if (researchItem.IsInventedEndMarker())
|
||||
{
|
||||
invented = false;
|
||||
continue;
|
||||
}
|
||||
else if (_s6.research_items[i].IsUninventedEndMarker() || _s6.research_items[i].IsRandomEndMarker())
|
||||
else if (researchItem.IsUninventedEndMarker() || researchItem.IsRandomEndMarker())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
RCT12ResearchItem* ri = &_s6.research_items[i];
|
||||
if (invented)
|
||||
gResearchItemsInvented.push_back(ResearchItem(*ri));
|
||||
gResearchItemsInvented.push_back(ResearchItem(researchItem));
|
||||
else
|
||||
gResearchItemsUninvented.push_back(ResearchItem(*ri));
|
||||
gResearchItemsUninvented.push_back(ResearchItem(researchItem));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user