mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 10:51:58 -05:00
Avoid assertion getting hit in scenery_is_invented() (#11079)
This commit is contained in:
parent
b70c5cefd6
commit
c6e42ac313
1 changed files with 5 additions and 0 deletions
|
@ -882,6 +882,11 @@ void S6Exporter::ExportResearchedSceneryItems()
|
|||
{
|
||||
ScenerySelection scenerySelection = { static_cast<uint8_t>((sceneryEntryIndex >> 8) & 0xFF),
|
||||
static_cast<uint16_t>(sceneryEntryIndex & 0xFF) };
|
||||
|
||||
// SV6 allows for more scenery types than there are. Avoid triggering an assertion in scenery_is_invented().
|
||||
if (scenerySelection.SceneryType >= SCENERY_TYPE_COUNT)
|
||||
break;
|
||||
|
||||
if (scenery_is_invented(scenerySelection))
|
||||
{
|
||||
int32_t quadIndex = sceneryEntryIndex >> 5;
|
||||
|
|
Loading…
Reference in a new issue