mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Merge remote-tracking branch 'upstream/develop' into new-save-format
This commit is contained in:
@@ -65,9 +65,9 @@ set(OBJECTS_VERSION "1.2.1")
|
||||
set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v${OBJECTS_VERSION}/objects.zip")
|
||||
set(OBJECTS_SHA1 "540e004abc683b3fe22211f5234e3d78ab023c5f")
|
||||
|
||||
set(REPLAYS_VERSION "0.0.55")
|
||||
set(REPLAYS_VERSION "0.0.56")
|
||||
set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v${REPLAYS_VERSION}/replays.zip")
|
||||
set(REPLAYS_SHA1 "70B4B7CB26A428801676BCC615F3881E72A45406")
|
||||
set(REPLAYS_SHA1 "C47048B71A95A95428A08035C94AD10E7A020D4D")
|
||||
|
||||
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
|
||||
option(WITH_TESTS "Build tests")
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
- Fix: [#15503] Freeze when doing specific coaster merges with block brakes.
|
||||
- Fix: [#15514] Two different “quit to menu” menu items are available in track designer and track design manager.
|
||||
- Fix: [#15560] Memory leak due to OpenGL Renderer not releasing a texture.
|
||||
- Fix: [#15567] Litter not being counted correctly during Park rating calculation (original bug).
|
||||
- Improved: [#3417] Crash dumps are now placed in their own folder.
|
||||
- Improved: [#13524] macOS arm64 native (universal) app
|
||||
- Improved: [#15538] Software rendering can now draw in parallel when Multithreading is enabled.
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
<TitleSequencesSha1>304d13a126c15bf2c86ff13b81a2f2cc1856ac8d</TitleSequencesSha1>
|
||||
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.2.1/objects.zip</ObjectsUrl>
|
||||
<ObjectsSha1>540e004abc683b3fe22211f5234e3d78ab023c5f</ObjectsSha1>
|
||||
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.55/replays.zip</ReplaysUrl>
|
||||
<ReplaysSha1>70B4B7CB26A428801676BCC615F3881E72A45406</ReplaysSha1>
|
||||
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.56/replays.zip</ReplaysUrl>
|
||||
<ReplaysSha1>C47048B71A95A95428A08035C94AD10E7A020D4D</ReplaysSha1>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -40,7 +40,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 "13"
|
||||
#define NETWORK_STREAM_VERSION "14"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
static Peep* _pickup_peep = nullptr;
|
||||
|
||||
@@ -165,11 +165,11 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
EntityListIterator_t begin()
|
||||
EntityListIterator_t begin() const
|
||||
{
|
||||
return EntityListIterator_t(std::cbegin(vec), std::cend(vec));
|
||||
}
|
||||
EntityListIterator_t end()
|
||||
EntityListIterator_t end() const
|
||||
{
|
||||
return EntityListIterator_t(std::cend(vec), std::cend(vec));
|
||||
}
|
||||
|
||||
@@ -125,3 +125,8 @@ rct_string_id Litter::GetName() const
|
||||
return STR_NONE;
|
||||
return litterNames[EnumValue(SubType)];
|
||||
}
|
||||
|
||||
uint32_t Litter::GetAge() const
|
||||
{
|
||||
return gCurrentTicks - creationTick;
|
||||
}
|
||||
|
||||
@@ -40,4 +40,5 @@ struct Litter : EntityBase
|
||||
static void RemoveAt(const CoordsXYZ& litterPos);
|
||||
void Serialise(DataSerialiser& stream);
|
||||
rct_string_id GetName() const;
|
||||
uint32_t GetAge() const;
|
||||
};
|
||||
|
||||
@@ -463,15 +463,11 @@ int32_t Park::CalculateParkRating() const
|
||||
|
||||
// Litter
|
||||
{
|
||||
int32_t litterCount = 0;
|
||||
for (auto litter : EntityList<Litter>())
|
||||
{
|
||||
// Ignore recently dropped litter
|
||||
if (litter->creationTick - gCurrentTicks >= 7680)
|
||||
{
|
||||
litterCount++;
|
||||
}
|
||||
}
|
||||
// Counts the amount of litter whose age is min. 7680 ticks (5~ min) old.
|
||||
const auto litterList = EntityList<Litter>();
|
||||
const auto litterCount = std::count_if(
|
||||
litterList.begin(), litterList.end(), [](auto* litter) { return litter->GetAge() >= 7680; });
|
||||
|
||||
result -= 600 - (4 * (150 - std::min<int32_t>(150, litterCount)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user