From b4bdc95c623e88e8dec588ceec737a1403706dc2 Mon Sep 17 00:00:00 2001 From: MarcelVos96 Date: Tue, 7 Jul 2026 19:30:43 +0200 Subject: [PATCH] Fix #26756: Guests cannot puke or litter on sloped path (#26757) --- assets.json | 4 ++-- distribution/changelog.txt | 1 + src/openrct2/entity/Litter.cpp | 6 ++++-- src/openrct2/network/NetworkBase.cpp | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets.json b/assets.json index 23b823faa6..80f5b8847d 100644 --- a/assets.json +++ b/assets.json @@ -16,7 +16,7 @@ "sha256": "dabb9787b1576342fca4dd9f64b3f8cfa04a7e6ce9c2bb9610f47b762905c858" }, "replays": { - "url": "https://github.com/OpenRCT2/replays/releases/download/v0.0.95/replays.zip", - "sha256": "df4082741c6f1fda1f10cfaf091abbcbbd5078670926b548feb29ee8aa85e3f5" + "url": "https://github.com/OpenRCT2/replays/releases/download/v0.0.96/replays.zip", + "sha256": "e5cd2564e64a8053ad73ee877618a8b1a592dc693825753d47cf82b5ddd058bb" } } diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 8e5fca7554..83632879aa 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,5 +1,6 @@ 0.5.4 (in development) ------------------------------------------------------------------------ +- Fix: [#26756] Guests cannot puke or litter on sloped path. 0.5.3 (2026-07-05) ------------------------------------------------------------------------ diff --git a/src/openrct2/entity/Litter.cpp b/src/openrct2/entity/Litter.cpp index 8179a1e9b4..b819e76f2d 100644 --- a/src/openrct2/entity/Litter.cpp +++ b/src/openrct2/entity/Litter.cpp @@ -10,6 +10,7 @@ #include "../profiling/Profiling.h" #include "../world/Footpath.h" #include "../world/Map.h" +#include "../world/tile_element/PathElement.h" #include "EntityList.h" #include "EntityRegistry.h" @@ -36,8 +37,9 @@ namespace OpenRCT2 if (tileElement->getType() != TileElementType::Path) continue; - int32_t pathZ = tileElement->getBaseZ(); - if (pathZ < mapPos.z || pathZ >= mapPos.z + kPathClearance) + int32_t pathBaseZ = tileElement->getBaseZ(); + int32_t pathTopZ = pathBaseZ + (tileElement->asPath()->IsSloped() ? kPathHeightStep : 0); + if (!(pathBaseZ <= mapPos.z && pathTopZ >= mapPos.z)) continue; return !TileElementIsUnderground(tileElement); diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index bf66c13705..081a98f2fe 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -48,7 +48,7 @@ // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -constexpr uint8_t kStreamVersion = 0; +constexpr uint8_t kStreamVersion = 1; const std::string kStreamID = std::string(kOpenRCT2Version) + "-" + std::to_string(kStreamVersion);