From a961d9784f82ed31f741aa99ffc24f6c40b32abb Mon Sep 17 00:00:00 2001 From: frutiemax Date: Wed, 15 Jul 2020 22:34:26 -0400 Subject: [PATCH] Part of #12243: Use coords for MazeRemoveTrack (#12251) --- src/openrct2/actions/RideDemolishAction.hpp | 8 ++++---- src/openrct2/network/Network.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index 97ee2f4430..9e0e49dd10 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -274,9 +274,9 @@ private: return res; } - money32 MazeRemoveTrack(uint16_t x, uint16_t y, uint16_t z, uint8_t direction) const + money32 MazeRemoveTrack(const CoordsXYZD& coords) const { - auto setMazeTrack = MazeSetTrackAction(CoordsXYZD{ x, y, z, direction }, false, _rideIndex, GC_SET_MAZE_TRACK_FILL); + auto setMazeTrack = MazeSetTrackAction(coords, false, _rideIndex, GC_SET_MAZE_TRACK_FILL); setMazeTrack.SetFlags(GetFlags()); auto execRes = GameActions::ExecuteNested(&setMazeTrack); @@ -339,8 +339,8 @@ private: for (Direction dir : ALL_DIRECTIONS) { - const CoordsXY& off = DirOffsets[dir]; - money32 removePrice = MazeRemoveTrack(location.x + off.x, location.y + off.y, location.z, dir); + const CoordsXYZ off = { DirOffsets[dir], 0 }; + money32 removePrice = MazeRemoveTrack({ location + off, dir }); if (removePrice != MONEY32_UNDEFINED) refundPrice += removePrice; else diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index 9bdd2ce3d8..397fb4ea45 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -32,7 +32,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 "21" +#define NETWORK_STREAM_VERSION "22" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr;