From 1ee2063cef7f6320cb1d387e43d05e3541da9b59 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sun, 18 Aug 2019 09:22:42 +0100 Subject: [PATCH 1/4] Partial fix of #9533. Door sounds not playing Will now look for correct field. But many json objects do not have this field set correctly. --- src/openrct2/object/WallObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/object/WallObject.cpp b/src/openrct2/object/WallObject.cpp index aa984b5d2a..9a69188e69 100644 --- a/src/openrct2/object/WallObject.cpp +++ b/src/openrct2/object/WallObject.cpp @@ -137,7 +137,7 @@ void WallObject::ReadJson(IReadObjectContext* context, const json_t* root) } // Door sound - auto jDoorSound = json_object_get(properties, "scrollingMode"); + auto jDoorSound = json_object_get(properties, "doorSound"); if (jDoorSound != nullptr) { auto doorSound = json_integer_value(jDoorSound); From f1ad9c4ec8b7f8a6ed89e05214fa70f7b74a75ac Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 18 Aug 2019 11:48:56 +0200 Subject: [PATCH 2/4] 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() From 7919e91716491fe6cfa62261c4abd00e72f7cb2f Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 18 Aug 2019 11:54:06 +0200 Subject: [PATCH 3/4] Update objects to v1.0.12 --- CMakeLists.txt | 4 ++-- OpenRCT2.xcodeproj/project.pbxproj | 2 +- openrct2.proj | 4 ++-- shell.nix | 4 ++-- src/openrct2-android/app/build.gradle | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aaca4a0a3d..1723ee56f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,8 +24,8 @@ set(CMAKE_MACOSX_RPATH 1) set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2c/title-sequences.zip") set(TITLE_SEQUENCE_SHA1 "304d13a126c15bf2c86ff13b81a2f2cc1856ac8d") -set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v1.0.11/objects.zip") -set(OBJECTS_SHA1 "8674120086929f9196560d77cada631fb478d7c0") +set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v1.0.12/objects.zip") +set(OBJECTS_SHA1 "56b5d22ed7da0afa750b3dcb5ac22de61e3597c2") set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v0.0.4/replays.zip") set(REPLAYS_SHA1 "6584368CD04EC42FDC2EB5DF26FECE9A964C27B7") diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 0c2c04d29c..becba9f865 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -3688,7 +3688,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "version=\"1.0.11\"\nzipname=\"objects.zip\"\nliburl=\"https://github.com/OpenRCT2/objects/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/data/object\" || ! -e \"${SRCROOT}/objectsversion\" || $(head -n 1 \"${SRCROOT}/objectsversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/data/object\" ]]; then rm -r \"${SRCROOT}/data/object\"; fi\nmkdir -p \"${SRCROOT}/data/object\"\n\ncurl -L -o \"${SRCROOT}/data/object/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/data/object\" \"${SRCROOT}/data/object/$zipname\"\nrm \"${SRCROOT}/data/object/$zipname\"\n\necho $version > \"${SRCROOT}/objectsversion\"\nfi"; + shellScript = "version=\"1.0.12\"\nzipname=\"objects.zip\"\nliburl=\"https://github.com/OpenRCT2/objects/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/data/object\" || ! -e \"${SRCROOT}/objectsversion\" || $(head -n 1 \"${SRCROOT}/objectsversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/data/object\" ]]; then rm -r \"${SRCROOT}/data/object\"; fi\nmkdir -p \"${SRCROOT}/data/object\"\n\ncurl -L -o \"${SRCROOT}/data/object/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/data/object\" \"${SRCROOT}/data/object/$zipname\"\nrm \"${SRCROOT}/data/object/$zipname\"\n\necho $version > \"${SRCROOT}/objectsversion\"\nfi"; }; C68B2D471EC790710020651C /* Download Libraries */ = { isa = PBXShellScriptBuildPhase; diff --git a/openrct2.proj b/openrct2.proj index 9ad6480940..f40db1ec61 100644 --- a/openrct2.proj +++ b/openrct2.proj @@ -70,8 +70,8 @@ 058b9df80244c03f1633cb06e9f70471a29ebb8e https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2c/title-sequences.zip 304d13a126c15bf2c86ff13b81a2f2cc1856ac8d - https://github.com/OpenRCT2/objects/releases/download/v1.0.11/objects.zip - 8674120086929f9196560d77cada631fb478d7c0 + https://github.com/OpenRCT2/objects/releases/download/v1.0.12/objects.zip + 56b5d22ed7da0afa750b3dcb5ac22de61e3597c2 https://github.com/OpenRCT2/replays/releases/download/v0.0.4/replays.zip 6584368CD04EC42FDC2EB5DF26FECE9A964C27B7 diff --git a/shell.nix b/shell.nix index bc62e53b35..3259fd74e8 100644 --- a/shell.nix +++ b/shell.nix @@ -15,8 +15,8 @@ let objects-src = pkgs.fetchFromGitHub { owner = "OpenRCT2"; repo = "objects"; - rev = "v1.0.11"; - sha256 = "21e83bd2afad735cc0f5d13f9c99a5dee81ea0ef3a6b937c0bfaadb7f0572c34"; + rev = "v1.0.12"; + sha256 = "95b4648712f986e0219d43bb5400357b4bcf9e045b04dba561fc5be3e25e081b"; }; title-sequences-src = pkgs.fetchFromGitHub { diff --git a/src/openrct2-android/app/build.gradle b/src/openrct2-android/app/build.gradle index 1a0969ebd0..2e389666e3 100644 --- a/src/openrct2-android/app/build.gradle +++ b/src/openrct2-android/app/build.gradle @@ -98,7 +98,7 @@ android.applicationVariants.all { variant -> into "$variant.mergeAssets.outputDir/data/title" } download { - src 'https://github.com/OpenRCT2/objects/releases/download/v1.0.11/objects.zip' + src 'https://github.com/OpenRCT2/objects/releases/download/v1.0.12/objects.zip' dest new File(buildDir, 'objects.zip') } copy { From 1f4d721a2b94e26e13915c5a63398dbda57d7755 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 18 Aug 2019 12:05:26 +0200 Subject: [PATCH 4/4] Update changelog [ci skip] --- distribution/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 5419a24709..672a8205fa 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,6 +4,7 @@ - Fix: [#7883] Headless server log is stored incorrectly if server name contains CJK in Ubuntu - Fix: [#8136] Excessive lateral G penalty is too excessive. - Fix: [#9179] Crash when modifying a ride occasionally. +- Fix: [#9533] Door sounds not playing. - Fix: [#9574] Text overflow in scenario objective window when using CJK languages. - Fix: [#9625] Show correct cost in scenery selection. - Fix: [#9669] The tile inspector shortcut key does not work with debugging tools disabled.