Skip to content

Commit

Permalink
Fix #12774: Plugin: Scripts are not reloaded after new scenario (#16686)
Browse files Browse the repository at this point in the history
  • Loading branch information
IntelOrca committed Feb 21, 2022
1 parent 88528c7 commit d93f4bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- Change: [#16424] Following an entity in the title sequence no longer toggles underground view when it's underground.
- Change: [#16493] Boat Hire and Submarine Ride support costs now match their visual appearance.
- Fix: [#11752] Track pieces with fractional cost are too cheap to build.
- Fix: [#12774] [Plugin] Scripts will not be re-initialised when a new scenario is loaded from within a running scenario.
- Fix: [#13336] Can no longer place Bumble Bee track design (reverts #12707).
- Fix: [#14155] Map Generator sometimes places non-tree objects as trees.
- Fix: [#14674] Recent Messages only shows first few notifications.
Expand Down
1 change: 1 addition & 0 deletions src/openrct2-ui/windows/TopToolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ static void WindowTopToolbarScenarioselectCallback(const utf8* path)
{
window_close_by_class(WC_EDITOR_OBJECT_SELECTION);
GetContext()->LoadParkFromFile(path, false, true);
game_load_scripts();
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ namespace OpenRCT2
// so reload the title screen if that happens.
loadTitleScreenFirstOnFail = true;

game_unload_scripts();
_objectManager->LoadObjects(result.RequiredObjects);
parkImporter->Import();
gScenarioSavePath = path;
Expand Down

0 comments on commit d93f4bd

Please sign in to comment.