Fix #14312: Research ride type message incorrect

In some cases, researching a new ride type appeared as a new vehicle instead.
This commit is contained in:
Rik Smeets 2022-10-05 19:26:44 +02:00 committed by GitHub
parent 47d040226b
commit 69721e66f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,6 @@
0.4.3 (in development)
------------------------------------------------------------------------
- Fix: [#14312] Research ride type message incorrect.
0.4.2 (2022-10-05)
------------------------------------------------------------------------

View file

@ -1028,7 +1028,8 @@ void research_determine_first_of_type()
for (auto& researchItem : gResearchItemsUninvented)
{
// The next research item is (sometimes?) also present in gResearchItemsUninvented
if (gResearchNextItem.has_value() && !gResearchNextItem->IsNull() && researchItem == gResearchNextItem.value())
if (gResearchNextItem.has_value() && !gResearchNextItem->IsNull()
&& researchItem.baseRideType == gResearchNextItem.value().baseRideType)
{
// Copy the "first of type" flag.
researchItem.flags = gResearchNextItem->flags;