Fix #15919: Scenery groups are missing in scenario editor

This commit is contained in:
Duncan authored and GitHub committed 2021-11-20 11:25:27 +01:00
1 parent f1a5b718e3
commit a60f7de103
3 files changed
+14

No files matched your search

+1
View File
@@ -8,6 +8,7 @@
- Fix: [#15844] Tile Inspector has inconsistent text colours.
- Fix: [#15878] Crash when opening a ride window for a corrupted vehicle.
- Fix: [#15908] Crash when track elements have no ride assigned.
- Fix: [#15919] Research status incorrectly considered for scenery when in editor modes.
0.3.5 (2021-11-06)
------------------------------------------------------------------------
+6
View File
@@ -597,6 +597,12 @@ bool scenery_group_is_invented(int32_t sgIndex)
return false;
}
// All scenery is temporarily invented when in the scenario editor
if (gScreenFlags & SCREEN_FLAGS_EDITOR)
{
return true;
}
if (gCheatsIgnoreResearchStatus)
{
return true;
+7
View File
@@ -12,6 +12,7 @@
#include "../Cheats.h"
#include "../Context.h"
#include "../Game.h"
#include "../OpenRCT2.h"
#include "../actions/BannerRemoveAction.h"
#include "../actions/FootpathAdditionRemoveAction.h"
#include "../actions/LargeSceneryRemoveAction.h"
@@ -291,6 +292,12 @@ int32_t wall_entry_get_door_sound(const WallSceneryEntry* wallEntry)
bool IsSceneryAvailableToBuild(const ScenerySelection& item)
{
// All scenery can be built when in the scenario editor
if (gScreenFlags & SCREEN_FLAGS_EDITOR)
{
return true;
}
if (!gCheatsIgnoreResearchStatus)
{
if (!scenery_is_invented(item))