1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Fix doorsound of legacy object

This commit is contained in:
Gymnasiast
2019-08-18 11:48:56 +02:00
parent 1ee2063cef
commit f1ad9c4ec8

View File

@@ -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()