mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #18576: Cannot open parks with certain types of corrupt tile elements
This commit is contained in:
parent
88e9f07c49
commit
ca91c67eeb
|
@ -48,6 +48,7 @@
|
|||
- Fix: [#18469] Land rights window buttons incorrectly disabled and markers remain visible indefinitely.
|
||||
- Fix: [#18459] ‘Highlight path issues’ hides fences for paths with additions.
|
||||
- Fix: [#18552] Trains clipping through helixes.
|
||||
- Fix: [#18576] Cannot open parks with certain types of corrupt tile elements.
|
||||
- Fix: [#18606] JSON objects do not take priority over the DAT files they supersede.
|
||||
- Fix: [#18620] [Plugin] Crash when reading widget properties from windows that have both static and tab widgets.
|
||||
- Fix: [#18653] Negative ratings multipliers do not appear in Vehicle tab.
|
||||
|
|
|
@ -30,7 +30,25 @@ using namespace OpenRCT2;
|
|||
|
||||
RCT12TileElementType RCT12TileElementBase::GetType() const
|
||||
{
|
||||
return static_cast<RCT12TileElementType>((this->type & TILE_ELEMENT_TYPE_MASK) >> 2);
|
||||
auto elem_type = static_cast<RCT12TileElementType>((this->type & TILE_ELEMENT_TYPE_MASK) >> 2);
|
||||
switch (elem_type)
|
||||
{
|
||||
case RCT12TileElementType::Surface:
|
||||
case RCT12TileElementType::Path:
|
||||
case RCT12TileElementType::Track:
|
||||
case RCT12TileElementType::SmallScenery:
|
||||
case RCT12TileElementType::Entrance:
|
||||
case RCT12TileElementType::Wall:
|
||||
case RCT12TileElementType::LargeScenery:
|
||||
case RCT12TileElementType::Banner:
|
||||
case RCT12TileElementType::Corrupt:
|
||||
case RCT12TileElementType::EightCarsCorrupt14:
|
||||
case RCT12TileElementType::EightCarsCorrupt15:
|
||||
return elem_type;
|
||||
default:
|
||||
// Most corrupt elements were set to 0x255, but not all. Fallback to corrupt element if encountered unknown type.
|
||||
return RCT12TileElementType::EightCarsCorrupt15;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t RCT12TileElementBase::GetDirection() const
|
||||
|
|
Loading…
Reference in New Issue