1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 02:05:13 +01:00

Play door sounds for land edge doors

This commit is contained in:
mix
2025-06-14 05:00:23 +01:00
parent 6c011c2a2a
commit 14aa6f7fdd
6 changed files with 41 additions and 14 deletions

View File

@@ -57,6 +57,11 @@ void TerrainEdgeObject::ReadJson(IReadObjectContext* context, json_t& root)
if (properties.is_object())
{
HasDoors = Json::GetBoolean(properties["hasDoors"]);
const uint32_t doorSoundNumber = Json::GetNumber<uint32_t>(properties["doorSound"]);
if (doorSoundNumber < OpenRCT2::Audio::kDoorSoundTypeCount)
{
doorSound = static_cast<OpenRCT2::Audio::DoorSoundType>(doorSoundNumber);
}
}
PopulateTablesFromJson(context, root);