1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00
Commit Graph

28458 Commits

Author SHA1 Message Date
Michael Steenbeek
44ca248dbd Merge pull request #24710 from Gymnasiast/nsis-add-czech
NSIS: Fix UTF-8 detection, add Czech
2025-07-02 17:36:21 +02:00
Gymnasiast
86b2b16f64 NSIS: Add Czech translation 2025-07-02 15:28:07 +02:00
Gymnasiast
3073b8db58 NSIS: Assume files without BOMs are UTF-8 2025-07-02 15:28:07 +02:00
Garv Changrani
b47506dd90 Close #24665: Don't return empty strings with quotes for std::string 2025-07-02 13:33:54 +02:00
OpenRCT2 git bot
62418a9588 Merge Localisation/master into OpenRCT2/develop 2025-07-02 04:08:18 +00:00
Ríša Szlachta
2e6cb2fb6f cs-CZ: Add translation to Flathub package 2025-07-01 17:37:19 +02:00
Michał Janiszewski
9747c27664 GCC15 fix in ReplayManager.cpp (#24707)
```
In member function ‘bool OpenRCT2::ReplayManager::SerialiseCommand(DataSerialiser&, OpenRCT2::ReplayCommand&)’,
    inlined from ‘bool OpenRCT2::ReplayManager::Serialise(DataSerialiser&, OpenRCT2::ReplayRecordData&)’ at /home/janisozaur/workspace/openrct2/src/openrct2/ReplayManager.cpp:778:37:
/home/janisozaur/workspace/openrct2/src/openrct2/ReplayManager.cpp:719:38: error: potential null pointer dereference [-Werror=null-dereference]
  719 |             command.action->Serialise(serialiser);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
```

```
$ gcc --version
gcc (GCC) 15.1.1 20250425
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
2025-07-01 11:15:09 +00:00
OpenRCT2 git bot
1826c8bcd2 Merge Localisation/master into OpenRCT2/develop 2025-06-30 04:10:46 +00:00
mrmbernardi
5f32624017 RideCreateAction: use constant instead of magic number 2025-06-29 20:54:46 +02:00
Matt
83aca7f374 Merge pull request #24689 from LRFLEW/nocopy
Remove Memory Copy in FileIndex::LoadOrBuild
2025-06-29 20:36:54 +03:00
LRFLEW
8819ae34a4 Remove Memory Copy in FileIndex::LoadOrBuild 2025-06-29 03:53:17 -05:00
OpenRCT2 git bot
118f23aa1c Merge Localisation/master into OpenRCT2/develop 2025-06-27 04:07:37 +00:00
Michael Steenbeek
2815d1958c Fix #18080: Obsolote .DAT objects can be loaded accidentally 2025-06-26 10:57:40 +00:00
OpenRCT2 git bot
e5d3633677 Merge Localisation/master into OpenRCT2/develop 2025-06-26 04:07:30 +00:00
Tulio Leao
eb07bd3e18 Make en-GB consistent with #24628 localisation changes
#24628 removed STR_5553 from all languages but en-GB, which was making the localisation report missing translations on OpenRCT2/Localisation PRs.

Additionally, it added this line break after STR_5816 which seemed unintentional to me.
2025-06-25 19:10:38 +02:00
OpenRCT2 git bot
e17dccae44 Merge Localisation/master into OpenRCT2/develop 2025-06-25 04:08:32 +00:00
Michael Steenbeek
3a09063f58 Merge pull request #24666 from Gymnasiast/fix/24661
Fix #24661: convert console command always crashes with a segmentation fault
2025-06-24 14:00:17 +02:00
Michael Steenbeek
f9b132e24d Remove sorting by difficulty in the scenario selector
This is barely used, complicates the scenario selector and Options window, and will get in the way when adding RCTC and custom campaign support. Time to remove it.
2025-06-24 10:53:26 +00:00
OpenRCT2 git bot
d3dcfb6e1a Merge Localisation/master into OpenRCT2/develop 2025-06-24 04:07:59 +00:00
Gymnasiast
f5acd2ba24 Fix: convert console command rejects files with an SV7 extension 2025-06-24 01:01:50 +02:00
Gymnasiast
f7612d56d0 Fix #24661: convert console command always crashes with a segmentation fault 2025-06-24 01:00:27 +02:00
mix
44decc9ce0 Rename metal support mappings 2025-06-24 00:31:10 +02:00
Cory Sanin
6fc950d38f Feature: Add optional screenshot argument for Z coord 2025-06-24 00:19:24 +02:00
Matt
d8964c5641 Fix #24509: Use std::sort instead of std::stable_sort (#24664) 2025-06-23 18:46:31 +02:00
OpenRCT2 git bot
d130e0dcc8 Merge Localisation/master into OpenRCT2/develop 2025-06-23 04:11:22 +00:00
Kuan-Wei Chiu
339f3ac755 Fix invalid null comparison in RideList sort comparator
The previous comparator returned false when either rideLhs or rideRhs was a nullptr, in an attempt to avoid null pointer dereference. However, this causes both comp(a, nullptr) and comp(nullptr, a) to return false, which violates the requirements of a strict weak ordering.

As defined in the C++ standard, the comparator used in std::sort must establish a strict weak ordering. This includes the requirement that the equivalence relation defined as
equiv(a, b) := !comp(a, b) && !comp(b, a) must be transitive.

In the original logic, two non-null elements a and b might be ordered such that comp(a, b) == true but if both comp(a, nullptr) and comp(b, nullptr) return false, then equiv(a, nullptr) == true and equiv(b, nullptr) == true, which implies equiv(a, b) == true. This contradicts comp(a, b) == true and violates transitivity of equiv.

Such violations can lead to undefined behavior in std::sort, including invalid memory access or segmentation faults.

Fix the comparator to consistently treat nullptr as greater than any non-null pointer, by returning rideLhs != nullptr when either pointer is null. This restores transitivity and compliance with the C++ standard, ensuring reliable and predictable sorting behavior.
2025-06-22 19:33:57 +02:00
Michael Steenbeek
51a5cff021 Merge pull request #24654 from Gymnasiast/refactor/metal-support-names
Rename members of support enums to lowerCamelCase
2025-06-21 23:31:10 +02:00
Gymnasiast
76ad3715bb Rename enum members of WoodenSupportTransitionType to lowerCamelCase 2025-06-21 14:46:32 +02:00
Gymnasiast
f267d6025b Rename enum members of WoodenSupportSubType to lowerCamelCase 2025-06-21 14:37:55 +02:00
Gymnasiast
38eccc4e2c Rename enum members of WoodenSupportType to lowerCamelCase 2025-06-21 14:36:46 +02:00
Gymnasiast
ed6cd227fc Rename enum members of MetalSupportType to lowerCamelCase 2025-06-21 14:16:40 +02:00
Gymnasiast
939d756244 Rename enum members of MetalSupportGraphic to lowerCamelCase 2025-06-21 14:12:50 +02:00
Gymnasiast
16ce220210 Rename enum members of MetalSupportPlace to lowerCamelCase 2025-06-21 14:12:49 +02:00
Michael Steenbeek
0e015264ae Land edge door animations (#24621)
* Add RCT1 land edge door map animations

* Only animate landscape edge doors if door exists

* Move Vehicle::UpdateLandscapeDoorA function

* Merge Vehicle::UpdateLandscapeDoor functions

* Only animate land edge doors if track is below surface height

* Play door sounds for land edge doors

* Add changelog entry for landscape edge door animations
2025-06-20 16:35:54 +02:00
Michael Steenbeek
c000b93be6 Add first translations batch to NSIS 2025-06-20 12:23:42 +02:00
Michał Janiszewski
68914ea79a Prevent unfollowing vehicles in viewports other than main
Some viewports, like the one in the guest window or the ride window, are
solely for the purpose of following a sprite. User could still try
RMB-dragging in those windows, which would result in the viewport no
longer following the sprite, but also not scrolling and simply getting
stuck at whatever the latest position was. This change prevents allowing
those viewports from unfollowing a sprite.
2025-06-19 00:31:30 +02:00
Michael Steenbeek
fb76d1b252 Merge pull request #24629 from janisozaur/hired-boat-division-by-zero
Fix #24617: Prevent hired boat with 0 speed causing division by 0
2025-06-19 00:12:17 +02:00
Gymnasiast
18543caf58 Rename ecx to newAcceleration 2025-06-18 23:40:07 +02:00
Michał Janiszewski
aa519879a7 Fix #24617: Prevent hired boat with 0 speed causing division by 0 2025-06-18 23:38:15 +02:00
Michał Janiszewski
cf72933aa5 Fix #24589: Ride's music tab doesn't redraw in multiplayer
Trigger an invalidation of the window when actually executing the
command.
2025-06-18 23:36:00 +02:00
Matt
4bbb5c4c61 Merge pull request #24534 from mrmbernardi/fix-24527
Fix: [#24527] Minor string artefacts when rebuilding scenario index
2025-06-17 15:57:31 +03:00
Michael Bernardi
b72e2e1c98 Clear stale scenario repo pointers during language change. 2025-06-17 22:42:18 +10:00
Michael Bernardi
1bc0eca74c Remove unused includes 2025-06-17 22:42:13 +10:00
Michael Steenbeek
1222670320 NSIS: disable languages without translations 2025-06-16 21:19:09 +00:00
Michael Steenbeek
7b322d825a Refactor constants in window .cpp files 2025-06-16 23:10:47 +02:00
Michał Janiszewski
0e9982d6ca Drop "Pause game when Steam overlay is open" feature
As shown in https://github.com/OpenRCT2/OpenRCT2/pull/24618, the steam
overlay feature doesn't work well and can cause jarring user experience
in some scenarios. It is only supported in the software renderer and
with code moving steadily to OpenGL, the time has come to remove a
broken feature.
2025-06-16 21:57:56 +02:00
Michał Janiszewski
72a8d25ad7 Make changelog format display diff in unified format (#24631) 2025-06-16 10:38:13 +02:00
mix
9e84dc809a Add changelog entry for landscape edge door animations 2025-06-14 22:29:21 +01:00
mix
14aa6f7fdd Play door sounds for land edge doors 2025-06-14 22:29:21 +01:00
mix
6c011c2a2a Only animate land edge doors if track is below surface height 2025-06-14 22:29:21 +01:00