From ec5ab09943a7cb351b24794256a52915378e3954 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 20 Aug 2018 17:41:48 +0200 Subject: [PATCH 1/3] Fix #7910: Allow game actions while paused if requested from callee. --- src/openrct2/actions/GameAction.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/openrct2/actions/GameAction.h b/src/openrct2/actions/GameAction.h index e0ab348bda..c9c3c52496 100644 --- a/src/openrct2/actions/GameAction.h +++ b/src/openrct2/actions/GameAction.h @@ -119,12 +119,19 @@ public: virtual uint16_t GetActionFlags() const { // Make sure we execute some things only on the client. + uint16_t flags = 0; + if ((GetFlags() & GAME_COMMAND_FLAG_GHOST) != 0 || (GetFlags() & GAME_COMMAND_FLAG_5) != 0) { - return GA_FLAGS::CLIENT_ONLY; + flags |= GA_FLAGS::CLIENT_ONLY; } - return 0; + if (GetFlags() & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED) + { + flags |= GA_FLAGS::ALLOW_WHILE_PAUSED; + } + + return flags; } /** From e5dd0be813cabce1c260565cd28c68febedf56ca Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 20 Aug 2018 17:44:22 +0200 Subject: [PATCH 2/3] Remove unnecessary GetActionFlags overrides. --- src/openrct2/actions/MazeSetTrackAction.hpp | 9 --------- src/openrct2/actions/RideDemolishAction.hpp | 5 ----- src/openrct2/actions/WallRemoveAction.hpp | 5 ----- 3 files changed, 19 deletions(-) diff --git a/src/openrct2/actions/MazeSetTrackAction.hpp b/src/openrct2/actions/MazeSetTrackAction.hpp index bc60c6fc1f..13acbe146c 100644 --- a/src/openrct2/actions/MazeSetTrackAction.hpp +++ b/src/openrct2/actions/MazeSetTrackAction.hpp @@ -75,15 +75,6 @@ public: { } - uint16_t GetActionFlags() const override - { - uint16_t flags = GameAction::GetActionFlags(); - if (GetFlags() & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED) - flags |= GA_FLAGS::ALLOW_WHILE_PAUSED; - - return flags; - } - void Serialise(DataSerialiser& stream) override { GameAction::Serialise(stream); diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index 16c1394482..a863ca1a3b 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -43,11 +43,6 @@ public: { } - uint16_t GetActionFlags() const override - { - return GameAction::GetActionFlags(); - } - void Serialise(DataSerialiser& stream) override { GameAction::Serialise(stream); diff --git a/src/openrct2/actions/WallRemoveAction.hpp b/src/openrct2/actions/WallRemoveAction.hpp index 851037aa1c..38991a817a 100644 --- a/src/openrct2/actions/WallRemoveAction.hpp +++ b/src/openrct2/actions/WallRemoveAction.hpp @@ -31,11 +31,6 @@ public: { } - uint16_t GetActionFlags() const override - { - return GameAction::GetActionFlags(); - } - void Serialise(DataSerialiser& stream) override { GameAction::Serialise(stream); From 673d9861ee01279c37fc2a68d1fb70ecc2c69b04 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 23 Aug 2018 13:29:04 +0200 Subject: [PATCH 3/3] Bump up network version. --- src/openrct2/network/Network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index 7f5840360b..b644708fc4 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -28,7 +28,7 @@ // This string specifies which version of network stream current build uses. // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "5" +#define NETWORK_STREAM_VERSION "6" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static rct_peep* _pickup_peep = nullptr;