1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Fix #6006: Objects higher than 6 metres are considered trees

This commit is contained in:
Michael Steenbeek
2019-03-18 22:56:14 +01:00
committed by GitHub
parent b8aeb56bdc
commit 68aa5122fa
7 changed files with 17 additions and 7 deletions

View File

@@ -46,6 +46,11 @@ void SmallSceneryObject::ReadLegacy(IReadObjectContext* context, IStream* stream
{
_frameOffsets = ReadFrameOffsets(stream);
}
// This crude method was used by RCT2. JSON objects have a flag for this property.
if (_legacyType.small_scenery.height > 64)
{
_legacyType.small_scenery.flags |= SMALL_SCENERY_FLAG_IS_TREE;
}
GetImageTable().Read(context, stream);
@@ -270,6 +275,7 @@ void SmallSceneryObject::ReadJson(IReadObjectContext* context, const json_t* roo
{ "allowSupportsAbove", SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP },
{ "supportsHavePrimaryColour", SMALL_SCENERY_FLAG_PAINT_SUPPORTS },
{ "SMALL_SCENERY_FLAG27", SMALL_SCENERY_FLAG27 },
{ "isTree", SMALL_SCENERY_FLAG_IS_TREE },
});
// Determine shape flags from a shape string