Commit Graph

293 Commits

Author SHA1 Message Date
Duncan e904ef406f
Fix #19503. Hide 3+ queue junction railings behind a flag (#19644)
* Fix #19503. Hide 3+ queue junction railings behind a flag

This is to prevent existing parks from changing their behaviour

* Clang format

* Bump version numbers. Update changelog

* Update text
2023-03-23 08:16:32 +00:00
ζeh Matt dddd52799c
Bump up network version 2023-03-22 22:28:15 +02:00
ζeh Matt 9610578621
Bump up network version 2023-03-22 21:51:52 +02:00
spacek531 fdbc3d29bb
steam position modifier and animation speed properties (#11269)
* Add speed and frame properties

* add steam position modifier

* copy code from OpenLoco

* update sin and cos

* add computation function

* finalize locomotion code

* fix formatting

* refine code

* refactor things slightly

* manually fix formatting

* use PascalCase and rename

* fix copyright notice

* fix name again

* rename function, move outt  of namespace

* fix rebase issues

* remove pitch table derived from physics

* rename some stuff

* flip vertical component sign to make sense

* change json structure

* create steam particles based on number of animation frames

* fix formatting

* add slope for spiral lift hill down

* fix formatting again

* parens around bitwise and

* make animations separate functions

* rename MultiDimCoaster to MultiDimension

* use EnumValue method

* rework multidim frame count

* bump network to be safe

* fix formatting

* move array out of function

* make table const

* move struct into RideObject.cpp

* try new method to fix numbers in multidim

* implement ZehMatt modulo

* add documentation to new function

* include Yaw.hpp

* rename src/ride/SteamPosition.hpp to src/math/Trigonometry.hpp

* actually add src/math/Trigonometry.hpp

* move ComputeSteamOffset to Vehicle.cpp

* use static asserts on arrays

* fix changelog grammar

* add more static asserts
2023-03-09 15:45:45 +02:00
duncanspumpkin 58247ce5c1 Bump network version 2023-03-08 22:05:35 +00:00
Matthias Moninger 7e48b57d6a
Fix #18986: Sending remote scripts larger than 63KiB crashing all clients. (#19573)
* Fix #18986: Sending remote scripts larger than 63KiB crashing clients

* Add GetRemotePlugins in ScriptEngine

* Bump up network version

* Update changelog.txt
2023-03-06 13:50:05 +01:00
Duncan a018cb1ca5
Fix import of ride value (#19541)
The ride value undefined constant was changed causing all imports of the undefined value to be incorrect. We can fix the broken imports but can't fix the users of the broken value (gParkValue and its history)
2023-03-03 08:45:32 +00:00
Michael Steenbeek dd624f9bff
Replace remaining usages of money16, money32 (#19469)
* Use money64 for ride prices and shop items

* Use money64 for park entrance fee

* Use money64 for gGuestInitialCash

* Use money64 for upkeep costs

* Use money64 for ride value

* Use money64 for marketing campaign cost

* Use money64 for object prices

* Use money64 for land prices

* Use money64 for guest expenditure

* Replace remaining occurrences of money32 with money64

* Update replays

* Bump network version

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-03-02 21:55:42 +00:00
Michael Steenbeek eb33147013
Bump network version for #19401 (#19410) 2023-02-15 11:34:03 +00:00
Michael Steenbeek 07d198f084
Close #12466: Add flag to use RCT1 interest (#19377)
* Close #12466: Add flag to use RCT1 interest

* Bump network version
2023-02-12 21:23:05 +00:00
spacek531 1dfbb5f124
Widen Vehicle::update_flags to 32 bits (#19340)
* Expand update_flags to uint32

* move IsCrashedVehicle to update_flags

* rename update_flags to Flags

* Update replays

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-02-10 21:46:06 +00:00
ζeh Matt 2f8e208a9d
Refactor sprite_index to Id 2023-01-27 19:21:57 +02:00
Michael Steenbeek 6b85b0a8c7
Change lift speed range of Classic Wooden RC (#19233)
* Change lift speed range of Classic Wooden RC

As this ride is meant to reflect both old-school wooden roller coasters, as well as RCT1’s wooden RC, it makes no sense the lift can be set to speeds up to 11 km/h. Limit this to 4-8 km/h.

* Bump network version

* Add changelog entry

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2023-01-25 12:01:54 +00:00
Wirlie 538b87e94c
Fix: A queuing guest can ignore the next guest in the queue in certain circumstances (RCT2 bug) (#19068)
* Use PeepDirection instead of sprite_direction to update queue position

* Align guests to the centre of the first queue tile.

* Bump network version

* Update changelog

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-24 09:35:12 +00:00
Duncan 9deed6d98a
Replace snakes in Class names OpenRCT2/N*-P* (#19227)
* Replace snakes in Class names OpenRCT2/N*-P*

* Rename PODDate (and TimeOfDay for good measure)

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2023-01-20 05:24:44 +00:00
Duncan 23b6d1840e
Rename classes with snakes OpenRCT2/G*-M* 2023-01-19 15:13:23 +00:00
Hielke Morsink 0762fcb601
Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Hielke Morsink 2c224cfd53
Rename snake_case functions in OpenRCT2/network folder (#19203) 2023-01-18 06:05:53 +00:00
Michael Steenbeek 12874f2af7
Replace format_string(4) with OpenRCT2::FormatStringLegacy() (#19190)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 21:56:30 +01:00
Michael Steenbeek bb55c6ce66
Remove loadsasnakes (#19192)
* Rename snake_case methods in scenario folder

* Rename snake_case methods in title folder

* Rename snake_case methods in object folder

* Rename snake_case methods in platform folder

* Rename snake_case methods in windows folder

* Rename tile_inspector.h to TileInspectorGlobals.h

* Rename snake_case methods in ui/windows folder
2023-01-17 19:46:55 +00:00
Hielke Morsink 6b7dc8fcdb
Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Michael Steenbeek bf5f7e8e71
Rename format_string(2) and is_user_string_id() (#19178)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 08:59:07 +00:00
Stephan Spengler 76b918e7ed
Change openrct2/ride methods to UpperCamelCase, part 1 2023-01-17 01:32:54 +01:00
Gymnasiast 5309c80e29
Remove snake_case in interface folder 2023-01-16 22:20:41 +01:00
Hielke Morsink 6dafbbfb65
Rename global window functions to TitleCase (#19167) 2023-01-16 20:13:42 +00:00
Duncan 8a8d3105f3
Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +00:00
Basssiiie b15a6e843a
[Plugin] Wrap callback arguments for custom game actions in event arguments object, fix issue with unloading multiplayer plugins (#19091)
* Wrap custom game action arguments in event args object

* Update Typescript declaration, documentation and changelog

* Pass custom game action by value and remove log messages
2023-01-15 20:52:23 +00:00
Gymnasiast 24247e9c6b
Migrate server setting getters to u8string 2023-01-08 16:19:18 +01:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Gymnasiast b90eab89fe
Bump network version 2022-12-17 18:08:50 +01:00
Gymnasiast 285e0fc42e
Release v0.4.3
- Feature: [#17782] The Flying Coaster now has access to boosters and can draw outside loops.
- Feature: [#17997] The Log Flume can now draw steep pieces down (if vehicle allows it).
- Feature: [#18312, objects#220, OpenSFX#13] New sound effects for the Hybrid and Single Rail roller coasters.
- Feature: [#18675] [Plugin] Plugins can refer to g2 image icons by name.
- Feature: [objects#173] Add alpine coaster vehicle.
- Feature: [objects#221] Add two extra jungle walls.
- Feature: [objects#225] Add log cabin roofs.
- Feature: [OpenMusic#14, OpenMusic#15, OpenMusic#18] Added Galaxy, Acid and Dodgems ride music styles.
- Improved: [#18013, #18016, #18018, #18019, #18514, objects#224] Added colour presets to Spiral Slide, Dodgems, Boat Hire, Flying Saucers, and Car Ride.
- Improved: [#18024] Clearer error messages when loading incompatible .park files.
- Improved: [#18192] Tycoon Park has been added to the Extras tab.
- Improved: [#18214] Competition scenarios have received their own section.
- Improved: [#18250] Added modern style file and folder pickers on Windows.
- Improved: [#18332] Allow Inverted Roller Coaster to draw boosters.
- Improved: [#18350] Changed ride vehicle list to have less padding.
- Improved: [#18422] Allow adding images to music objects.
- Improved: [#18428] [Plugin] Add widget description interfaces to documentation.
- Improved: [#18487] Mini Helicopters track can now draw spinning tunnels.
- Improved: [#18591] Order RollerCoaster Tycoon 2 scenarios by difficulty.
- Improved: [#18607] A new tab for all UCES Scenarios, if it’s installed.
- Improved: [#18621] OpenGL performance.
- Change: [#17677] Open campaign window from finished campaign news.
- Change: [#17998] Show cursor when using inverted mouse dragging.
- Change: [#18230] Make the large flat to steep pieces available on the corkscrew roller coaster without cheats.
- Change: [#18381] Convert custom invisible paths to the built-in ones.
- Change: [OpenSFX#11, OpenMusic#19] First implementation of official replacement asset packs for sound effects & music.
- Fix: [#1491] Clearance of the Cash Machine is too low (original bug).
- Fix: [#1519] “See-through rides” doesn't affect all rides (original bug).
- Fix: [#6341] “Unlock vehicle limits” does not allow setting fewer vehicles than the vehicle type requires.
- Fix: [#14312] Research ride type message incorrect.
- Fix: [#14425] Ride ratings do not skip unallocated ride ids.
- Fix: [#15969] Guests heading for ride use vanilla behaviour
- Fix: [#17067] Random Staff Patrol Area clicks.
- Fix: [#17316] Sides of River Rapids’ corners overlay other parts of the track.
- Fix: [#17657] When switching from buying land rights to buying construction rights, grid disables and won't re-enable afterwards.
- Fix: [#17763] Missing validation on invalid characters in file name.
- Fix: [#17853] Invention name tears while being dragged.
- Fix: [#18064] Unable to dismiss notification messages.
- Fix: [#18070] Underground entrance/exit shows through terrain walls (original bug).
- Fix: [#18094] Underground shops & facilities don't show when adjacent to non-underground path (original bug).
- Fix: [#18122] Ghosts count towards “Great scenery!” guest thought.
- Fix: [#18134] Underground on-ride photo section partially clips through adjacent terrain edge.
- Fix: [#18244] Invention DragWindow's starting position is inconsistent.
- Fix: [#18245] Guests stopping dead in their tracks at railway crossings.
- Fix: [#18257] Guests ‘waiting’ on extended railway crossings.
- Fix: [#18354] Overwrite alert does not show when save name has different casing on Windows.
- Fix: [#18379] Tunnel entrances for underground Mini Golf Hole E are not rendered correctly.
- Fix: [#18442] About window background is clickable.
- Fix: [#18449] [Plugin] Change type of listview widgets from 'scroll_view' to 'listview'.
- Fix: [#18453] Slow walking guests don't get across level crossings in time.
- Fix: [#18469] Land rights window buttons incorrectly disabled and markers remain visible indefinitely.
- Fix: [#18459] ‘Highlight path issues’ hides fences for paths with additions.
- Fix: [#18552] Trains clipping through helixes.
- Fix: [#18576] Cannot open parks with certain types of corrupt tile elements.
- Fix: [#18606] JSON objects do not take priority over the DAT files they supersede.
- Fix: [#18620] [Plugin] Crash when reading widget properties from windows that have both static and tab widgets.
- Fix: [#18653] Negative ratings multipliers do not appear in Vehicle tab.
- Fix: [#18696] Construction rights cannot be viewed after all are purchased.
- Fix: [#18720] Upwards helix is enabled for the Alpine Coaster, even when cheats are off.
- Fix: [#18755] Ferris Wheel and Circus ghosts not coloured correctly.
- Fix: [#18802] Game could crash when determining if a mechanic is heading to fix the ride blocking the path.
2022-12-14 13:22:08 +01:00
Karst 2c68c73a24
Add steep drops to the Log Flume 2022-12-07 22:52:22 +01:00
Duncan 482971710d
Apply code style to context functions 2022-11-06 21:49:07 +01:00
AuraSpecs 4c218ba443
Allow Inverted RC to draw boosters 2022-11-05 11:59:31 +00:00
Duncan 7f085e2752
Update rating skipping unused ride ids (#14425)
* Skip empty ride ids when evaluating ride ratings

This isn't much of a problem atm but when we increase the limit it may start to become an issue

* Increment network version

* Update changelog
2022-11-04 20:17:31 +00:00
73 048352edca
Guests will use Vanilla behaviour when choosing whether to head for a ride when leaving the park #15969 (#18500)
* Fix #18501: Guests incorrectly determining ride

This will restore guest behaviour to how it was in rct2 vanilla by having them only try to determine whether to ride a ride if they haven't already decided to leave the park

* Fix peeps incorrectly deciding when to get on rides in rain

This should now match how vanilla operates in the rain

* Update replays

Co-authored-by: reticulatingsplines <13323105+ReticulatingSplines@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-11-04 07:22:04 +00:00
Rik Smeets b2ae5b1413
Fix guests stopping dead in tracks at crossings (#18245)
When guests have to stop for a railway crossing, they stop dead in their tracks - right at the frame at which stop walking. This could look a tad weird at times.

Now, guests will assume a natural idle waiting position. If they have food or a drink, they will continue consuming it from time to time. And occasionally, guests might even wave at the train passing by!
2022-11-01 08:43:38 +01:00
Rik Smeets 6faddd94f5
Fix slow guests don't get across level crossing in time (#18453) 2022-10-31 19:57:50 +01:00
Hielke Morsink bff430805f
Rename public network config data members 2022-10-16 21:46:06 +02:00
AuraSpecs dda256ef5f
Add inverted large loops and inverted boosters to Flying RC 2022-10-13 20:51:54 +02:00
Rik Smeets bba54d2ecc Fix guests 'waiting' on extended railway crossings
On extended railway crossings, guests would stop to 'wait' for the passing train, which would then phase right through them. This change at least allows guests a chance to get to a safe place.
2022-10-08 21:59:26 +02:00
ZeeMajora ea04c0b010
Corkscrew rc's large flat to steep pieces available cheatless (#18230)
Makes the corkscrew roller coaster's large flat to steep pieces available without cheats for consistency with the looping & twister roller coasters which are similar coaster types that have this element available without cheats.
2022-10-07 22:27:58 +02:00
duncanspumpkin 16581e9288 Address snakes in mapgen and map animation 2022-10-05 20:22:51 +01:00
Nick 4aabc00335
Fix: ghosts are counted in guest scenery or fountain thoughts 2022-10-05 17:57:22 +00:00
Gymnasiast 8ceea45877
Release v0.4.2
- Feature: [#6326] Ability to load .SV6 files from RCT Classic that have more than 9601 guests.
- Feature: [#6570, #10860, #17929] Fully support RollerCoaster Tycoon Classic as a RCT2 base install path.
- Feature: [#13634] Add ability to sell merchandise in random colours.
- Feature: [#16164] Add new track elements for Flying Coaster and Lay-Down Coaster and add paint code for more elements.
- Feature: [#16283] Added parkinfo command line tool to list objects in a save file.
- Feature: [#16662] Show a warning message when g2.dat is mismatched.
- Feature: [#17107] Ride operating settings can be set via text input.
- Feature: [#17638] Added Zero G rolls, medium loops and large corkscrews to the Hybrid and Single-Rail coasters.
- Feature: [#17821] [Plugin] Add API for track subpositions and vehicle subposition.
- Feature: [#17877] Add three real-life flying roller coaster colour schemes.
- Feature: [#17900] Add “Classic Wooden Coaster” with shallow banked turns.
- Feature: [#18057] Staff members now wait for passing or stalled vehicles before crossing railway tracks.
- Feature: [#18168] Add additional track pieces to the LIM Launched Coaster and the Looping Coaster.
- Feature: [objects#198] Add additional pirate roofs.
- Feature: [objects#205] Add additional glass roofs.
- Feature: [objects#209] Add the Steel Roller Coaster train and 2-across Inverted Train from RollerCoaster Tycoon 1.
- Feature: [#18050] Add asset pack manager and asset packs.
- Improved: [#15358] Park and scenario names can now contain up to 128 characters.
- Improved: [#15589] Numpad Enter can now be used to close text input.
- Improved: [#16819] Don’t prompt to “Save game as” when saving a loaded saved game (excepting autosaves).
- Improved: [#16840] Add support for rectangular heightmaps.
- Improved: [#17575] You can now search for Authors in Object Selection.
- Improved: [#17806] Added warning when using RCT1 objects without RCT1 linked.
- Improved: [#17868] [Plugin] You can now change active tab of a custom window programmatically.
- Improved: [#17909] Track elements that are not supported by any train are now hidden by default.
- Improved: [#17924] Improved performance when loading JSON object images from a .DAT file.
- Improved: [#17955] Modifying ratings via in-game console is now multiplayer-safe and also freezes the ratings.
- Improved: [#18177] [Plugin] Widget tooltips can now be read and changed.
- Change: [#9104] Calculate maze support costs.
- Change: [#17319] Giant screenshots are now cropped to the horizontal view-clipping selection.
- Change: [#17499] Update error text when using vehicle incompatible with TD6 and add error when using incompatible track elements.
- Change: [#17655] Lower default price for the Crooked House.
- Change: [#17745] Make maintenance cost of Mini-Golf more balanced.
- Change: [#17762] Use vertical tabs in the New Game dialog.
- Change: [#18113] Increased limit of Loan Interest in Scenario Editor to 255%.
- Fix: [#5141] Headless server is counted as a player.
- Fix: [#7466] Coaster track not drawn at tunnel exit.
- Fix: [#10535] Guests getting stuck at specific level crossings.
- Fix: [#14337] Guest blocking ride entrance after ride price changed to be unaffordable.
- Fix: [#15328] Wooden Roller Coaster incorrectly draws a railing on the first station piece (original bug).
- Fix: [#16392] Scenery on sloped surface is placed at wrong height.
- Fix: [#16476] The game sometimes crashes when demolishing a maze.
- Fix: [#17053] Crash when trying to open files under 4 bytes in length.
- Fix: [#17312] (Flying) Inline Twist appearing under the surface when placed on ground level.
- Fix: [#17339] Distorted visuals when changing scaling factor between integer numbers in OpenGL rendering mode.
- Fix: [#17394] Six-seater Hyper-Twister Trains focuses ride window camera on Car 2 rather than Car 1 (original bug).
- Fix: [#17430] Possible crash when toggling tile element visibility in multiplayer.
- Fix: [#17444] “Manta Ray” boats slowed down too much in “Ayers Rock” scenario (original bug).
- Fix: [#17503] Parks with staff with an ID of 0 have all staff windows focus on that staff.
- Fix: [#17508] Grid doesn’t disable after setting patrol area.
- Fix: [#17532] Object Selection window allows unselecting all station types.
- Fix: [#17533] Missing audio when specifying ‘--rct2-data-path’.
- Fix: [#17535] Multiplayer desync when placing rides with scenery.
- Fix: [#17541] Station style not correctly saved to TD6.
- Fix: [#17542] Stalls will autorotate towards paths outside the park.
- Fix: [#17544, #17754] Visual glitches in Invention List window.
- Fix: [#17553] Crash when moving invention list items to empty list.
- Fix: [#17571] All researched tracked rides show up as new vehicles in .park scenarios.
- Fix: [#17600] Notifications are not properly cleared when loading a park.
- Fix: [#17605] Crash when opening parks which have had objects removed externally.
- Fix: [#17639, 17735] When building upside down, the special elements list contains many items twice (original bug).
- Fix: [#17664] Unable to save after an extended period of time due to inactive ride music data leaking.
- Fix: [#17703] (undefined string) when building on invalid height.
- Fix: [#17776] “Other Parks” tab uses separate lists for SC4/SC6 and .park scenarios.
- Fix: [#17784] Colour preset RNG is biased (original bug).
- Fix: [#17788] Guests could leave queue if another guest rejoins it from the entrance building.
- Fix: [#17834] Finance window becomes blank after 4096 years.
- Fix: [#17816] Option to pause game when Steam Overlay is active is not greyed out when using the OpenGL renderer.
- Fix: [#17897] Guest can get stuck on tiles with construction rights outside the park.
- Fix: [#17904] Trees are removed at no cost to make way for ride entrance/exits.
- Fix: [#17905] The chain button in the map window is enabled for rectangular maps when (re)opened.
- Fix: [#17931] The in-game command ‘count_objects’ crashes the game.
- Fix: [#17865] With difficult guest generation, tested but unopened rides still contribute to the guest cap.
- Fix: [#17866] [Plugin] Wrong Soft Guest Cap at start of new game.
- Fix: [#17889] Peeps don’t stop at level railway crossings if approached from downhill.
- Fix: [#17980] Queue lines of track designs mess up existing queue lines if dragged through them.
- Fix: [#17959] Areas marked for dirty drawing are too large.
- Fix: [#17963] Some marketing campaigns can’t be started after Finances window tab has been on Research.
- Fix: [#17964] Sprites don’t show up on two sides of the view-clip selection.
- Fix: [#17966] Reversed steel trains do not properly import from S4.
- Fix: [#17973] Bins and lamps overlay parts of the land (original bug).
- Fix: [#18008] Steeplechase S-bends has multiple gaps visible in the tracks (original bug).
- Fix: [#18009] Visual glitch with litter at edge of sloped path.
- Fix: [#18025] Fix land ownership in Six Holland, Six Flags Magic Mountain, North America - Grand Canyon and Asia - Great Wall of China Tourism Enhancement scenarios.
- Fix: [#18026] Park rating drops to 0 with more than 32k guests, total ride excitement or intensity.
- Fix: [#18032] All non-interactive widgets (labels, groupboxes) produce sound when clicked.
- Fix: [#18035] Favourited servers don’t get their online status updated.
- Fix: [#18051] Visual glitch with Mine Ride’s large unbanked turn (original bug).
- Fix: [#18059] [Plugin] Width and height of custom window not changeable via script.
- Fix: [#18063] Guests can stop for all kinds of actions at railway crossing.
- Fix: [#18087] Bank balance is clamped to a 32-bit integer every transaction.
2022-10-05 12:07:57 +02:00
X123M3-256 8b00fd1824
Add additional track pieces to LIM Launched Coaster and the Looping Coaster (#18168) 2022-10-05 06:41:10 +00:00
Rik Smeets 6d97bbddf9
Fix #18063: Guests stopping at railway crossings
Guests could stop at railway crossings for actions like taking a picture, watching a ride / a ride being constructed, reading a map etc. This also could mean they'd be in the way for a passing train.

Now, these actions will no longer be performed if the guest is at a crossing.
2022-10-01 19:09:51 +02:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Rik Smeets efa7a23773
Fix #18140 & #18143: Invalid read in Staff
The tile element should be determined the same way as is done when checking if the footpath is blocked by a vehicle.

Also added some extra safety checks and made the code a bit more efficient / reusable. For example: when the staff member is not a mechanic, the tile element doesn't have to determined.
2022-09-30 18:00:59 +00:00
Michael Steenbeek a0dd6a3aa6
Fix #18087: gCash clamped to 32-bit integer every transaction 2022-09-28 12:20:44 +02:00