mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Fix #2324. Inventions list changes no longer break scenery window.
Issue was caused by the invention list flags being passed into the finish research function and interpreting always researched scenery sets as rides. This could also cause crashes if there were more scenery sets than rides researched.
This commit is contained in:
@@ -285,8 +285,9 @@ static void research_always_researched_setup()
|
||||
/**
|
||||
*
|
||||
* rct2: 0x00685A79
|
||||
* Do not use the research list outside of the inventions list window with the flags
|
||||
*/
|
||||
static void sub_685A79()
|
||||
static void research_remove_flags()
|
||||
{
|
||||
for (rct_research_item* research = gResearchItems;
|
||||
research->entryIndex != RESEARCHED_ITEMS_END_2;
|
||||
@@ -556,15 +557,15 @@ void window_editor_inventions_list_open()
|
||||
* rct2: 0x006853D2
|
||||
*/
|
||||
static void window_editor_inventions_list_close(rct_window *w)
|
||||
{
|
||||
{
|
||||
research_remove_flags();
|
||||
|
||||
// When used in-game (as a cheat)
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR)) {
|
||||
gSilentResearch = true;
|
||||
sub_684AC3();
|
||||
gSilentResearch = false;
|
||||
}
|
||||
|
||||
sub_685A79();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user