1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

Part of #12243: Use coords for MazeRemoveTrack (#12251)

This commit is contained in:
frutiemax
2020-07-15 22:34:26 -04:00
committed by GitHub
parent 0fa0ca451e
commit a961d9784f
2 changed files with 5 additions and 5 deletions

View File

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

View File

@@ -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;