From f1ad9c4ec8b7f8a6ed89e05214fa70f7b74a75ac Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 18 Aug 2019 11:48:56 +0200 Subject: [PATCH] Fix doorsound of legacy object --- src/openrct2/object/WallObject.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/openrct2/object/WallObject.cpp b/src/openrct2/object/WallObject.cpp index 9a69188e69..dd2304f7e0 100644 --- a/src/openrct2/object/WallObject.cpp +++ b/src/openrct2/object/WallObject.cpp @@ -10,6 +10,7 @@ #include "WallObject.h" #include "../core/IStream.hpp" +#include "../core/String.hpp" #include "../drawing/Drawing.h" #include "../interface/Cursors.h" #include "../localisation/Language.h" @@ -39,6 +40,14 @@ void WallObject::ReadLegacy(IReadObjectContext* context, IStream* stream) { context->LogError(OBJECT_ERROR_INVALID_PROPERTY, "Price can not be free or negative."); } + + // Autofix this object (will be turned into an official object later). + auto identifier = GetIdentifier(); + if (String::Equals(identifier, "XXWLBR03")) + { + _legacyType.wall.flags2 &= ~WALL_SCENERY_2_DOOR_SOUND_MASK; + _legacyType.wall.flags2 |= (1u << WALL_SCENERY_2_DOOR_SOUND_SHIFT) & WALL_SCENERY_2_DOOR_SOUND_MASK; + } } void WallObject::Load()