1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00
Commit Graph

16623 Commits

Author SHA1 Message Date
saad
ab96ca8516 Fix #14918 rename eax and refactor while loop to avoid overflow 2021-07-30 19:34:42 +04:00
saad
fd823c8acb Fix #14918 refactor while loop and int variable size 2021-07-30 18:38:42 +04:00
andrewpratt64
62d66ca9d0 Add hook for vehicle crashes to plugin api (#15084)
* Add initial implementation of "vehicle.crash" hook for the scripting api

The hook will fire whenever a vehicle crashes, i.e. an individual car
explodes and it's status becomes "Crashed!"

* Update contributors.md

Add name to contributors list under the "Additional implementation (OpenRCT2)" section.

- If the added line needs to be changed or removed entirely let me know

- I added this based off of the Github wiki: "If it's the first time you're contributing with the project, make sure to update the contributors.md file by appending your name at the end of the respective list."

* Move hook code into function

* Rename hook function

Renamed function, "FireVehicleCrashHook" to "InvokeVehicleCrashHook"

* Wrap InvokeVehicleCrashHook in #ifdef

Move the #ifdef from inside the function body to the outside

* Update changelog and api version

- Added entry to changelog
- Increment API version

* Fix whitespace

Replace tab character with four spaces

* Update src/openrct2/scripting/HookEngine.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2021-07-30 09:03:15 -03:00
ZehMatt
d9f9e7542a Use EnumMap for HookEngine lookups 2021-07-29 17:07:49 +03:00
ZehMatt
e520e4f991 Use EnumMap for RideObject lookup tables 2021-07-29 17:07:48 +03:00
ZehMatt
e991c128dc Use EnumMap for format token lookups 2021-07-29 17:07:48 +03:00
ZehMatt
3fbfa26dd3 Use EnumMap for Cursors string lookup 2021-07-29 17:07:48 +03:00
ZehMatt
f44687b6b2 Use EnumMap for lookup tables in scripting 2021-07-29 17:07:48 +03:00
ZehMatt
ce8040b858 Use EnumMap for string to colour conversion 2021-07-29 17:07:48 +03:00
ZehMatt
a36e0a32f7 Add EnumMap container for bidirectional key, enum mapping 2021-07-29 17:07:48 +03:00
Michael Steenbeek
1ea9bbbb1b Fix formatting 2021-07-29 13:32:48 +02:00
Kane
dbdca55645 Fix #14316: Closing the Track Designs Manager window causes broken state
When exiting the Track Design Manager window the user was placed into the scenario editor in a broken state.
User is now returned to the main menu when the window is closed.
2021-07-29 12:44:24 +02:00
Michael Steenbeek
71ff9bf6d6 Allow loading images from .pob files (#15122) 2021-07-28 21:25:51 +02:00
ζeh Matt
87007ba2a3 Change track paint signature to pass ride instead of ride index 2021-07-28 18:21:59 +02:00
Gymnasiast
6f9468a316 Implement invisible platforms on some tracked rides 2021-07-28 11:23:09 +02:00
Gymnasiast
5486dd3fa4 Hide wooden platforms when the “no platforms” station style is selected 2021-07-28 11:22:55 +02:00
Gymnasiast
bb682ca09d Hide brown base on flat rides if "no platform" station style is selected 2021-07-28 11:22:44 +02:00
Michael Steenbeek
ab18612882 Remove Music Acknowledgements window (#15116)
It was of limited use to us anyway since we didn’t license the music ourselves, but now the actual track names and composers are shown in the Object Selection, the window lost its last bit of usefulness.
2021-07-28 10:26:35 +02:00
Michael Steenbeek
f3aac0bb96 Merge pull request #15113 from ZehMatt/fix-nsf-pathfinding
Fix path finding for larger maps
2021-07-28 09:21:52 +02:00
Michael Steenbeek
0b6e80c7d4 Add error message body to failed Place Park Entrance action 2021-07-27 23:50:16 +02:00
ZehMatt
b7b3418b75 Fix setNull on inherited classes leaving uninitialized variables 2021-07-27 21:34:53 +03:00
ZehMatt
163fe3756d Fix GameStateSnapshots buffer overrun 2021-07-27 21:10:06 +03:00
Duncan
d76611e0f2 Actually allocate a banner when using GetOrCreateBanner
When importing a file this function is used to create a banner at a certain index. Previously this was not assigning the id to the banner id. Luckily as banner id is a new field this did not cause any issues except in the nsf which does use the banner id more extensively
2021-07-27 19:58:09 +02:00
ZehMatt
ac08049472 Adapt SV6 import and export for peep path-finding data 2021-07-27 20:40:19 +03:00
ZehMatt
bb6b931a7d Use TileCoordsXYZ in path finding for bigger map support 2021-07-27 20:39:39 +03:00
ZehMatt
0e7d05a5ad Add TileCoordsXYZD serialiser traits 2021-07-27 20:15:10 +03:00
ZehMatt
b9ec5d079e Add construction of TileCoordsXYZD with TileCoordsXYZ 2021-07-27 19:57:45 +03:00
Michael Steenbeek
7b7744057e Merge pull request #15101 from ZehMatt/crashdumps
Dump crash dumps into a different directory and include version in reports
2021-07-27 18:02:47 +02:00
ZehMatt
47287e7fb1 Save crash dumps into a separate directory 2021-07-27 18:39:13 +03:00
ζeh Matt
afc4cd7cba Refactor ride construction code into a new unit 2021-07-27 17:21:03 +02:00
Michael Steenbeek
9c2fb84a53 Invalidate screen when toggling transparent water flag
Pointed out here: https://github.com/OpenRCT2/OpenRCT2/issues/14753#issuecomment-849024680
2021-07-27 12:16:36 +02:00
ζeh Matt
13aee659f0 Fix #15096: Crash placing entrance near corner in scenario editor 2021-07-27 12:02:34 +02:00
Duncan
e9eb1b8304 Banner Refactor from NSF (#14788)
* Banner refactor

* Fix mistake in fix_duplicated_banners

* Reduce limit back

* Fix export

* Free banner on delete

* Increment network version

* Fix potential banner pointer crashes

Co-authored-by: Ted John <ted@brambles.org>
2021-07-27 10:25:58 +01:00
Michael Steenbeek
6405d0246c Fix #14612: Crash in research_insert_ride_entry() 2021-07-26 22:23:03 +02:00
Michael Steenbeek
ba6407f649 Fix #5465: improper types in Objective::CheckGuestsBy() 2021-07-26 21:23:41 +02:00
Michael Steenbeek
d880fbda56 Use constant for RCT1 max map size 2021-07-26 21:17:33 +02:00
Michael Steenbeek
4f80ef50ef Fix #15086: Crash in vehicle_create_trains() 2021-07-26 21:17:17 +02:00
ZehMatt
dab33b3347 Add version to the crash dump info 2021-07-26 00:39:39 +03:00
duncanspumpkin
5087e77032 Release v0.3.4.1
- Fix: [#15028] Crash when placing large scenery.
- Fix: [#15048] Crash when removing litter with cheats.
- Fix: [#15052] Crash when using banner window.
- Fix: [#15063] Crash when opening large scenery signs.
- Improved: [#12626] Allow using RCT2 saves to mark RCT Classic (.sea) parks as finished and vice versa.
2021-07-25 20:16:08 +01:00
duncanspumpkin
e8e7bdb776 Update Backtrace.io token for v0.3.4.1 2021-07-25 20:04:58 +01:00
Hielke Morsink
c887a049d2 Fix various Cppcheck warnings (#15081) 2021-07-24 23:41:50 +02:00
Duncan
cd98ca0d8e Fix 15063 (#15064)
* Fix #15063. Sign window crash on open

* Update changelog
2021-07-23 19:37:24 +01:00
ZehMatt
c15f17c49a Fix potential null dereference 2021-07-22 22:14:12 +03:00
ZehMatt
e4758df2e9 Fix #15048: Crash removing litter from cheats 2021-07-22 22:14:12 +03:00
Duncan
90fbbe14ed Fix 15052 (#15054)
* Fix #15052. Crash when using banner window

Bug introduced during refactor. Refactor introduces a pointer that will go invalid. When the pointer was invalid the game would crash.

* Update changelog
2021-07-22 15:15:59 +01:00
Duncan
bbef85e752 Fix #15028, #15042. Crash when placing large scenery (#15043)
* Fix #15028, #15042. Crash when placing large scenery

When the fragmented tile element limit is reached whilst placing a large scenery ghost the game will perform a reorg of the map elements invalidating tile element pointers. As large scenery are multi tiled this can happen mid action invalidating the pointer that was allocated for the first tile element. Large scenery actions pass back the first tile element pointer to the calling function for use with ghost removal. When this pointer is invalid it causes the crash. The ultimate fix for this would be to create an undo function for actions. As an interim the function has been modified to return the first tile height.

* Update changelog
2021-07-21 13:01:09 +01:00
Gymnasiast
2a175e7678 Split off mini golf acceleration calculation 2021-07-20 15:01:18 +02:00
Gymnasiast
1965aaca73 Replace loc_6DBA33 with a loop 2021-07-20 14:48:18 +02:00
Gymnasiast
3966c6f7a4 Cleanup gotos to loc_6D8E36 2021-07-20 14:43:29 +02:00
Gymnasiast
d0436c7379 Rename unkF64E35 to stationBrakesWork 2021-07-20 14:35:01 +02:00