Commit Graph

918 Commits

Author SHA1 Message Date
Ted John be9cb19df5 Replace cURL with WinHttp implementation on Windows
This reduces the number of third party dependencies for Windows builds. WinHttp is quite a nice straight forward API so doesn't involve too much extra code.
2020-02-08 17:47:03 +00:00
Michael Steenbeek 5da4903430
Fix #10629: Footpaths on the ground do not cost money (#10671) 2020-02-08 16:29:14 +01:00
Duncan 661be85193
Fix #10196: Cannot place doors at end of track corners (#10663) 2020-02-08 00:02:33 +01:00
Gymnasiast ca2f37ae7f
Remove opt::optional polyfill
std::optional is supported by Xcode 10. The non-polyfill variant was already used in our code, so this is not likely to break anything that wasn't broken before.
2020-02-01 22:25:03 +01:00
Ted John 519ea1c8c3 Fix #10376: No ratings generated when a shop and track intersect (#10387) 2020-01-25 23:09:58 +01:00
Michael Steenbeek d798811c4a Make GetWaterHeight return big Z (#10579)
* Make GetWaterHeight return big Z

* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Michael Steenbeek 8a9f0eeca5
Prepare track piece handling code for more than 256 pieces (#10575) 2020-01-17 12:27:14 +01:00
duncanspumpkin 98de6db515 Increment network version 2020-01-16 20:28:42 +00:00
Michael Steenbeek 08ab15ef36
Fix #10313: Path furniture can be placed on level crossings 2020-01-05 17:59:02 +01:00
Tulio Leao f790fb9079 Improve variable initialisation, if statements and assertions 2019-12-27 15:05:28 -03:00
Tulio Leao 1bc399537e Fix C6001: using uninitialized memory 2019-12-27 15:05:27 -03:00
Matt cfe90c3c3b
Bump up network version 2019-12-26 13:30:02 +01:00
Matt 69eb3f5d91
Bump up network version 2019-12-22 07:50:55 +01:00
Duncan 3be7d824ac
Merge pull request #10397 from duncanspumpkin/refactor_gcommand
Remove gCommandPosition. Use GameActionRes instead.
2019-12-19 20:48:20 +00:00
duncanspumpkin 11974dd7b3 Increment Network Version 2019-12-15 08:31:26 +00:00
frutiemax 18ba9b27a3 Implement #7865: Allow transport rides to synchronise with adjacent stations (#10280) 2019-12-14 09:58:00 +01:00
ζeh Matt 7744fc71e4 Fix #10256: Desync because of client advancing ahead of server ticks during map change (#10257) 2019-11-17 23:26:32 +01:00
ζeh Matt 5606b4895b Fix desync because of ride status (#10227) 2019-11-16 16:12:33 +01:00
Duncan bb48a471e6
Merge pull request #10135 from tupaschoal/constexpr-for-openrct2-defines
Use constexpr on openrct2/*
2019-10-30 19:45:25 +00:00
Tulio Leao 9123b597a9 Use constexpr on openrct2/* 2019-10-29 18:44:14 -03:00
Michał Janiszewski d645338752 Release 0.2.4
- Feature: [#9285] Remember current group in scenario list window.
- Feature: [#9918] Increase image list capacity by about 100k units.
- Change: [#1349] Increase the number of ride music played simultaneously from 2 to 32.
- Fix: [#4927] Giant screenshot cut off at bottom and top.
- Fix: [#7572] Queue paths connect to regular paths through fences.
- Fix: [#7690] Problem with guests freezing on certain tiles of path.
- Fix: [#7883] Headless server log is stored incorrectly if server name contains CJK in Ubuntu
- Fix: [#8136] Excessive lateral G penalty is too excessive.
- Fix: [#8584] Duck spawning function does not check tiles with x or y coordinate of 0..64 (Original bug)
- Fix: [#9179] Crash when modifying a ride occasionally.
- Fix: [#9533] Door sounds not playing.
- Fix: [#9574] Text overflow in scenario objective window when using CJK languages.
- Fix: [#9603] Don't render audio when master volume is turned off.
- Fix: [#9625] Show correct cost in scenery selection.
- Fix: [#9669] The tile inspector shortcut key does not work with debugging tools disabled.
- Fix: [#9675] Guest entry point limit can be bypassed in scenario editor.
- Fix: [#9683] Cannot raise water level if part of the tool's area of effect is off of the map.
- Fix: [#9684] Entering custom size for water/land tool allows confirmation with main enter key, but not numpad enter key.
- Fix: [#9690] The keyboard shortcut for rotating the game view can be set to Enter or KP Enter, but not both.
- Fix: [#9717] Scroll bars do not render correctly when using OpenGL renderer.
- Fix: [#9729] Peeps do not take into account height difference when deciding to pathfind to a ride entrance (original bug).
- Fix: [#9902] Doors/Portcullis do not check to make sure doors are open causing double opens.
- Fix: [#9926] Africa - Oasis park has wrong peep spawn (original bug).
- Fix: [#9953] Crash when hacked rides attempt to find the closest mechanic.
- Fix: [#9955] Resizing map in while pause mode does not work and may result in freezes.
- Fix: [#9957] When using 'no money' cheat, guests complain of running out of cash.
- Fix: [#9970] Wait for quarter load fails.
- Fix: [#9994] Game action tick collision during server connect and map load.
- Fix: [#10017] Ghost elements influencing ride excitement.
- Fix: [#10036] Do not allocate large chunks of memory for save file classification.
- Fix: [#10106] Ride circuits should not be used for modes that do not support it.
- Fix: [#10149] Desync in headless mode with rides that create smoke particles.
- Improved: [#9466] Add the rain weather effect to the OpenGL renderer.
- Improved: [#9987] Minimum load rounding.
- Improved: [#10125] Better support for high DPI screens.
2019-10-28 21:18:47 +01:00
ζeh Matt 040a0e58aa Fix desync in headless mode with rides that create smoke particles 2019-10-27 16:55:34 +01:00
Matt 666158df1c
Bump up network version 2019-10-20 00:22:11 +02:00
Tulio Leao dbb66dd028 Remove duplicate functions (#10067)
* Reduce code duplication in src\openrct2\interface\Window.cpp

`window_resize_gui_scenario_editor` was a subset of `window_resize_gui`

* Reduce code duplication in src\openrct2\network\Twitch.cpp

Both `GetFollowers()` and `GetMessage()` were very similar

* Reduce code duplication in src/openrct2/world/SmallScenery.cpp

`map_place_non_scenery_clear_func` and `map_place_scenery_clear_func` did basically the same thing, with a single branch difference

* Reduce code duplication in src/openrct2-ui/windows/TopToolbar.cpp

Make `top_toolbar_tool_update_scenery_clear` call `top_toolbar_tool_update_land_paint` and then do the additional differing calculation it did.
2019-10-19 15:38:26 +02:00
Tulio Leao 9d468167e4 Fix #10106: Reset number of circuits if unsupported
Closes #10106
2019-10-18 18:06:51 -03:00
Hielke Morsink 8c1ccfdaa9
Fix possible cause for desyncs on ride crashes (#10104)
`scenario_rand` was used twice between two sequence points. The order of evaluation is unspecified in C++, meaning that these calls could be done in both forward and reverse order. Storing them in variables guarantees their order, making this cross-platform.
2019-10-16 21:51:59 +02:00
Matt 884611c20b
Bump up network version 2019-10-05 13:13:44 +02:00
Matt 0c11bbd4e7
Fix #9994: Game action tick collision during server connect and map load 2019-10-05 13:09:21 +02:00
ζeh Matt 0b95dcd0d0 Fix #8584: Duck spawn search now uses entire map (#9743) 2019-10-02 22:14:56 +02:00
aw20368 ff1698bcb9 Improve #9987: Minimum load rounding (#9987)
Refactor code for vehicles waiting for a specific load level.
Original code rounded the target load down, changed to round up.
2019-09-28 20:51:13 +02:00
ζeh Matt b2a42de579 Fix ghost elements influencing ride excitement 2019-09-23 22:36:51 +02:00
Jan Beich a5555649ec network: unbreak build with Clang 9 (#10014)
ld: error: libopenrct2.a(Network.cpp.o): unable to find library from dependent library specifier: Ws2_32.lib
2019-09-23 17:14:57 +02:00
Gymnasiast 856075a781
Bump network version and amend changelog 2019-09-22 23:07:57 +02:00
gill984 565ad3798d Fix #9957: Guests complain about running out of money in no money parks 2019-09-22 16:52:53 +02:00
Michael Steenbeek a11762b11a
Remove old C functions that only call their equivalent
* Remove old C functions that only call their equivalent

* fix formatting
2019-09-22 14:12:49 +02:00
Joseph Atkins-Turkish 747e00512d Fix #7572: Queue paths connect to regular paths through fences 2019-09-18 23:31:29 +02:00
Gymnasiast 673b12029e
Bump network version 2019-09-09 23:07:46 +02:00
Michał Janiszewski 8637eb6c57
Rename some bits to allow unity builds of libopenrct2 (#9944)
* Rename some bits to allow unity builds of libopenrct2

Some names are clashing when doing a unity build, renaming them solves
the problem.
2019-08-29 23:03:56 +02:00
ζeh Matt 1db18d4778 Bump up network version (#9949) 2019-08-28 19:58:30 +01:00
Matt 9f773f27f8
Bump up network version 2019-08-23 23:06:45 +02:00
Ted John d5a1b4fc8f Fix #9920: Ghost pieces break maps on multiplayer for the client (#9928) 2019-08-23 21:05:00 +02:00
Matt c36591c81f
Bump up network version 2019-08-21 00:29:05 +02:00
Matt 8c9008825d
Remove remaining game command/game action code from network 2019-08-21 00:26:43 +02:00
Matt 4f7dab6f67
Fix desync because of incorrect tick data 2019-08-21 00:19:52 +02:00
Matt 769ed255f3
Refactor game action queue out of network into GameActions 2019-08-21 00:15:39 +02:00
Gymnasiast 386e6a20a9
Bump network version 2019-08-19 20:39:24 +02:00
ζeh Matt 09f707ad8a Fix #9886: Object animations not working as multiplayer client (#9887) 2019-08-16 18:05:49 +01:00
Ted John 68dc4d0fb8 Bump network version to deprecate recent bugged versions 2019-08-10 15:24:59 +01:00
Duncan 75210ef3e2
Merge pull request #9742 from duncanspumpkin/fix_9729
Fix 9729
2019-08-08 06:02:08 +01:00
duncanspumpkin 2557e373db Increment network version 2019-08-06 21:29:08 +01:00
Matt 8670385505
Bump up network version 2019-08-06 00:49:37 +02:00
Matt 01de097ef0
Fix #9666: pause server if no clients are connected 2019-08-06 00:49:37 +02:00
duncanspumpkin e3d79e7600 Increment network version 2019-08-05 20:20:24 +01:00
Michael Steenbeek 073e4b0ccc
Fix #7690: Problem with guests freezing on certain tiles of path (#9723) 2019-08-04 17:19:40 +02:00
Michael Steenbeek c1fa86a843
Merge pull request #9623 from IntelOrca/refactor/remove-user-strings
Remove user string pool
2019-08-01 11:00:21 +02:00
Duncan 77f1905271
Fix #8136. Fix incorrect calculation of excessive lateral G penalty. (#9667)
* Fix #8136. Fix incorrect calculation of excessive lateral G penalty.

This penalty had been modified for OpenRCT2 moving it from before certain other penalties were applied to after. The move accidently removed the ride type multiplier which caused a very large penalty to be applied. In addition the excitement penalty applied to the whole calculation instead of just the gforce bonus. This caused an excessive penalty to the excitement.

* Add changelog entry. Fix default initilisation.

* Increment network version
2019-07-29 19:35:04 +01:00
Ted John 40d49b93d3 Do not use user strings for peep names 2019-07-29 19:18:16 +01:00
Michał Janiszewski 837879018f
Make socket status atomic (#9636)
* Make socket status atomic

`TcpSocket::ConnectAsync` will call `Connect` and modify `_status` from
a different thread and must ensure it doesn't introduce a data race.

* Update src/openrct2/network/Socket.cpp

Co-Authored-By: ζeh Matt <m.moninger.h@gmail.com>
2019-07-24 15:05:26 +02:00
Ted John a1d9e52046 Rename ToUtf16 to ToWideChar
This is more correct as wchar_t size can differ, for example Linux typically uses 32 bits for wchar_t where as Windows uses 16 bits.
2019-07-22 23:44:03 +01:00
Ted John 6f61c94dbd Remove old widechar <-> utf-8 conversion function 2019-07-22 23:44:03 +01:00
Ted John 5733d666b3 Do not store park name as a user string 2019-07-21 11:33:15 +02:00
Michael Steenbeek aff3e42408
Merge pull request #9453 from duncanspumpkin/remove_gc
Remove Networked Game Commands
2019-07-14 14:46:46 +02:00
Aaron van Geffen ac7a1ebf71 Release v0.2.3.
- Feature: [#485] Rides can now be simulated with ghost trains during construction.
- Feature: [#1260] Option for making giant screenshots have a transparent background.
- Feature: [#2339] Find local servers automatically when fetching servers.
- Feature: [#7296] Allow assigning a keyboard shortcut for the scenery picker.
- Feature: [#8029] Add the Hungarian Forint (HUF) to the list of available currencies.
- Feature: [#8481] Multi-threaded rendering.
- Feature: [#8558] Guest debugging tab.
- Feature: [#8659] Banner and sign texts are now shown in tooltips.
- Feature: [#8687] New multiplayer toolbar icon showing network status with reconnect option.
- Feature: [#8791] Improved tile element flag manipulation in Tile Inspector.
- Feature: [#8919] Allow setting ride price from console.
- Feature: [#8963] Add missing Czech letters to sprite font, use sprite font for Czech.
- Feature: [#9154] Change map toolbar icon with current viewport rotation.
- Change: [#7877] Files are now sorted in logical rather than dictionary order.
- Change: [#8427] Ghost elements now show up as white on the mini-map.
- Change: [#8688] Move common actions from debug menu into cheats menu.
- Change: [#9428] Increase maximum height of the Hypercoaster to RCT1 limits.
- Fix: [#2294] Clients crashing the server with invalid object selection.
- Fix: [#4568, #5896] Incorrect fences removed when building a tracked ride through
- Fix: [#5103] OpenGL: ride track preview not rendered.
- Fix: [#5889] Giant screenshot does not work while using OpenGL renderer.
- Fix: [#5579] Network desync immediately after connecting.
- Fix: [#5893] Looking at guest window tabs other than the main tab eventually causes assertion.
- Fix: [#5905] Urban Park merry-go-round has entrance and exit swapped (original bug).
- Fix: [#6006] Objects higher than 6 metres are considered trees (original bug).
- Fix: [#7039] Map window not rendering properly when using OpenGL.
- Fix: [#7045] Theme window's colour pickers not drawn properly on OpenGL.
- Fix: [#7323] Tunnel entrances not rendering in 'highlight path issues' mode if they have benches inside.
- Fix: [#7729] Money Input Prompt breaks on certain values.
- Fix: [#7884] Unfinished preserved rides can be demolished with quick demolish.
- Fix: [#7913] RCT1/RCT2 title sequence timing is off.
- Fix: [#7700, #8079, #8969] Crash when unloading buggy custom rides.
- Fix: [#7829] Rotated information kiosk can cause 'unreachable' messages.
- Fix: [#7878] Scroll shortcut keys ignore SHIFT/CTRL/ALT modifiers.
- Fix: [#8219] Faulty folder recreation in "save" folder.
- Fix: [#8480, #8535] Crash when mirroring track design.
- Fix: [#8507] Incorrect change in vehicle rolling direction.
- Fix: [#8537] Imported RCT1 rides/shops are all numbered 1.
- Fix: [#8553] Scenery removal tool removes fences and paths while paused.
- Fix: [#8598] Taking screenshots fails with some park names.
- Fix: [#8602] Wall piece collision detection deviates from vanilla
- Fix: [#8649] Setting date does not work in multiplayer.
- Fix: [#8873] Potential crash when placing footpaths.
- Fix: [#8882] Submarine Ride does not count as indoors (original bug).
- Fix: [#8900] Peep tracking is not synchronized.
- Fix: [#8909] Potential crash when invoking game actions as server.
- Fix: [#8947] Detection of AVX2 support.
- Fix: [#8988] Character sprite lookup noticeably slows down drawing.
- Fix: [#9000] Show correct error message if not enough money available.
- Fix: [#9067] Land/water tools show prices when money is disabled.
- Fix: [#9124] Disconnected clients can crash the server.
- Fix: [#9132] System file browser cannot open SV4 files.
- Fix: [#9152] Spectators can modify ride colours.
- Fix: [#9202] Artefacts show when changing ride type as client or using in-game console.
- Fix: [#9240] Crash when passing directory instead of save file.
- Fix: [#9245] Headless servers apply Discord Rich Presence.
- Fix: [#9293] Issue with the native load/save dialog.
- Fix: [#9322] Peep crashing the game trying to find a ride to look at.
- Fix: [#9324] Crash trying to remove invalid footpath scenery.
- Fix: [#9402] Ad campaigns disappear when you save and load the game.
- Fix: [#9411] Ad campaigns end too soon.
- Fix: [#9476] Running `simulate` command on park yields `Completed: (null)`.
- Fix: [#9520] Time Twister object artdec29 conversion problem.
- Fix: Guests eating popcorn are drawn as if they're eating pizza.
- Fix: The arbitrary ride type and vehicle dropdown lists are ordered case-sensitively.
- Improved: [#6116] Expose colour scheme for track elements in the tile inspector.
- Improved: Allow the use of numpad enter key for console and chat.
2019-07-10 22:52:26 +02:00
Jim Armstrong f80695d0eb Fix #9485: Staff cannot be hired in pause mode (#9489)
Set ALLOW_WHILE_PAUSED flag for staff hire GA
2019-06-27 17:42:18 +02:00
duncanspumpkin 759db552f4 Remove game command for non network builds 2019-06-23 18:50:35 +01:00
duncanspumpkin 2d75c01882 Unnetwork game commands
Only track designs still use game commands and they cannot be networked so remove dead code
2019-06-23 18:50:35 +01:00
duncanspumpkin e99c51d23c Remove game command callback 2019-06-23 18:50:35 +01:00
duncanspumpkin 27e958fe2b Increment network version 2019-06-20 19:34:02 +01:00
duncanspumpkin b896f07687 Add PeepPickupAction
Move Guest and Staff pickup to the new game action. Rework the game
action so that only one game action is required for the two game
commands. Remove the final game command with a callback.
2019-06-20 19:34:02 +01:00
Matt 881b7012ac
Bump up network version 2019-06-19 03:29:46 +02:00
Michael Steenbeek bbd93f93cc
Increase maximum height of Hypercoaster to RCT1 limits 2019-06-18 21:44:06 +02:00
duncanspumpkin 501e4ba3f9 Increment network version 2019-06-12 19:18:07 +01:00
duncanspumpkin 9cd3119897 Increment network version 2019-06-11 18:44:23 +01:00
Matt ea7374b332
Bump up network version 2019-06-11 17:50:17 +02:00
Matt 92129f01d0
Bump up network version 2019-06-11 05:10:27 +02:00
Matt 82fd212834
Fix #8859: Network gCheatsEnableAllDrawableTrackPieces on initial join 2019-06-11 05:10:05 +02:00
Ted John 6f0298deb3 Refactor ride measurement storage 2019-06-09 11:55:41 +02:00
aw20368 df263eb1f6 Fix #5896 Fences not always removed when building a tracked ride through (#9341)
Fence removal did not account for track direction. Added the rotation for the track/fence intersection test.
2019-06-04 23:27:36 +02:00
James Warwood 67f1359936 Fix: Unable to change colours of scrolling wall banner sign via sign dialog (#9303)
1. Check in SignSetStlyeAction query was accidentally inverting value of
   wallFound boolean
2. Code in action execution was not looping through the tile elements to find
   the correct wall piece like the query did (which meant just fixing 1. would
   cause a segfault)

Moved code to find relevant wall tile element into new helper function
banner_get_scrolling_wall_tile_element() in Banner; use in both query and action
to avoid any duplication of search logic.
2019-05-30 10:33:13 +02:00
James Warwood 1cf4f17ee6 Fix: Unable to use second skyscraper terrain edge style
Code to check if selected edge style is valid was passing the wrong object type
(surface instead of edge) to GetLoadedObject, causing that method to warn that
the selected edge style index was out-of-range.
2019-05-27 22:37:31 +02:00
Sijmen Schoon f26a1aee57 Fix compile error with DISABLE_HTTP (#9309)
There are two variables, MASTER_SERVER_REGISTER_TIME and
MASTER_SERVER_HEARTBEAT_TIME, which are unused when DISABLE_HTTP is set.
This commit fixes that.
2019-05-26 16:06:56 +02:00
ζeh Matt ee79c11389 Fix desync when host changes map 2019-05-19 17:44:43 +02:00
Matt 8389e5119b
Bump up network version 2019-05-18 19:57:51 +02:00
James Warwood d7074e65a2 Fix: Staff patrol areas getting clobbered when hiring new staff (#9271)
Fixed incorrect indexing when resetting staff patrol areas during hiring
process.
2019-05-18 11:43:06 +02:00
ζeh Matt 1978372679
Merge pull request #9236 from ZehMatt/fix-ga-logging
Improve game action logging
2019-05-15 22:44:47 +02:00
ζeh Matt 1a01a49002 Fix #9124: Disconnected clients can crash the server 2019-05-15 19:55:16 +02:00
Gymnasiast cb6a563e2d Bump network version [ci skip] 2019-05-14 21:59:16 +02:00
duncanspumpkin 0b7d7027e1 Fix formatting 2019-05-14 21:58:55 +02:00
duncanspumpkin e72195d16e Make suggested changes 2019-05-14 21:58:55 +02:00
duncanspumpkin 1eb7f4d8c6 Implement Modify Group and Kick Player Actions.
Further work on the Game Actions porting
2019-05-14 21:58:55 +02:00
Duncan 7793001f5d Implement BalloonPressAction
Furthering reducing the number of game commands and moving them to the Game Action framework
2019-05-14 21:54:54 +02:00
duncanspumpkin 4de6071fb4 Increment network version 2019-05-12 19:03:03 +01:00
Michael Steenbeek e5eea9d1fa
Merge pull request #9235 from ZehMatt/fix-util-rand
Improve util_rand
2019-05-12 13:50:19 +02:00
Ted John 15cb3e1889 Remove unnecessary new line characters from log calls (#9237) 2019-05-12 13:48:56 +02:00
Ted John 616fdfd96e
Merge pull request #9212 from IntelOrca/fix/2339-broadcast-lan
Implement searching of local servers by broadcasting UDP packets.
2019-05-12 12:07:56 +01:00
Matt eb3018b6a9
Fix warnings 2019-05-12 11:32:41 +02:00
Matt 5198df5c25
Improve generation of random advertisment key 2019-05-12 11:27:48 +02:00
Duncan 5da95e963d
Fix GameAction use during pause (#9242)
* Use correct flag to allow action while paused.

Mistake made during implementing on GameActions

* Increment network version
2019-05-12 09:54:21 +01:00
Ted John dd20ebad49 Make more methods const 2019-05-12 00:57:56 +01:00
Ted John 5e94f6385d Initialise hostname 2019-05-12 00:51:33 +01:00
Ted John 73b8310e8e Refactor creation of UDP socket 2019-05-12 00:51:33 +01:00
Ted John f0d1e9c320 Apply some of the code review comments 2019-05-12 00:51:33 +01:00
Ted John 3334d40da4 Explicitly use std::launch::async 2019-05-12 00:51:33 +01:00
Gymnasiast 6e6fe3c3c1 Replace optional.value() with *optional (fix Xcode compilation)
Xcode cannot handle the optional.value() notation, but *optional
should mean the same.

Also see https://en.cppreference.com/w/cpp/utility/optional/operator*
2019-05-12 00:51:33 +01:00
Gymnasiast 9b1321067b Use opt:: namespace 2019-05-12 00:51:33 +01:00
Ted John 52afcb795f Fix windows build 2019-05-12 00:51:33 +01:00
Ted John 47f48721e8 Fix clang build 2019-05-12 00:51:33 +01:00
Ted John 4b0f2bbceb Fix disable network / disable http builds 2019-05-12 00:51:33 +01:00
Ted John 20f52a8cbe Refactor TcpSocket and UdpSocket 2019-05-12 00:51:33 +01:00
Ted John 6a4791e39e Only reply to broadcasts with correct message 2019-05-12 00:51:33 +01:00
Ted John 59ddd7e1ea Get and broadcast to all broadcast address 2019-05-12 00:51:33 +01:00
Ted John 51117432f0 Improve status messages and prevent duplicates 2019-05-12 00:51:33 +01:00
Ted John 04c04d197e Refactor broadcasting code and logging 2019-05-12 00:51:33 +01:00
Ted John 4f0a733496 Sort by LAN servers 2019-05-12 00:51:33 +01:00
Ted John 3a400a2471 Refactor server list 2019-05-12 00:51:33 +01:00
Ted John 4437113805 Fix server list LAN address and port 2019-05-12 00:51:33 +01:00
Ted John 7a20874366 Fix Windows build 2019-05-12 00:51:33 +01:00
Ted John 123a8eacad Get the server list showing LAN servers 2019-05-12 00:51:33 +01:00
Ted John 694cb7eb3f Implement UDP socket and broadcasting 2019-05-12 00:50:13 +01:00
Ted John 5992b9f76e Add UDP socket class 2019-05-12 00:49:37 +01:00
Matt 2ea15ac146
Write server log as binary 2019-05-11 23:42:23 +02:00
Matt c1d6337e3b
Increase buffer size to avoid truncating text 2019-05-11 23:40:59 +02:00
Matt 9561567b6c
Bump up network version 2019-05-11 21:39:01 +02:00
ζeh Matt c8f822ea70
Gamestate snapshots (#8819)
* Add initial interface.

* Implement move operator in MemoryStream

* Add pod array serialisation traits.

* Add push_back with move semantics to CircularBuffer

* Initial implementation of GameStateSnapshots

* Add GameStateSnapshots to Context.

* Add mp_desync console command.

* Compare sprite data and fill change list.

* Minor changes.

* Proof of concept.

* Calculate offset instead of using offsetof

* Implement game state difference detection

* Update mp_desync console command.

* Fix identification of sprite remove/add.

* Fix crash when only one peep in park when using mp_desync

* Output state differences into user directory desync folder.

* Add desync debugging as an option.

* Add information to network status when a desync report was created.

* Cast to proper type for %llu.

* Update xcode project

* Add more information to the diffed data.

* Remove client-only relevant fields.

* Cleanup.

* Add better name output for misc sprites

* Add srand0 and tick information to the output

* Bump up network version

* Cleanup

* Set desync_debugging to false as default

* Apply suggestions
2019-05-11 21:31:34 +02:00
ζeh Matt 1f6c7c9942 Fix false positive desync when changing map during network play 2019-05-11 18:27:09 +02:00
Filip Gawin 6833da77e3 Simplify boolean expresions 2019-05-10 22:00:38 +02:00
Michał Janiszewski 7b71fe8acd Fix error value checked from ride_get_smallest_station_length (#8719)
ride_get_smallest_station_length returns the int32_t::max instead of -1
on error.
2019-05-08 22:34:41 +01:00
Gymnasiast 2368fea91e Bump network version 2019-05-06 19:15:32 +02:00
ζeh Matt cd8c67ddac
Implement SetCheatAction. (#8990)
* Implement SetCheatAction.

* Bump up network version
2019-05-04 15:28:38 +02:00
Aaron van Geffen f1b9c71524
Merge pull request #8687 from Xkeeper0/f/multiplayer-plus
Multiplayer dropdown additions
2019-05-02 22:53:50 +02:00
Florian Will 8c109307cf Fix #8507: Incorrect change in vehicle rolling direction
In OpenRCT2, when vehicles roll backward on a long, flat track piece,
they would eventually change their direction of movement and move
forward instead, after their velocity reached -4095. The acceleration
due to rolling resistance and drag changes to 0 at that point, which
caused the "implicit boost" up to a velocity of ~+32k (close to 2km/h)
to trigger.

The behavior is different in vanilla RCT2, where vehicles just keep on
very slowly rolling backwards.

This commit disables the "implicit forward boost" for vehicles rolling
backward to mimic vanilla RCT2 behavior.
2019-05-02 22:22:59 +02:00
Xkeeper 7e6bed39d4 Fix z->s and DISABLE_NETWORK support 2019-05-02 00:30:30 +02:00
Xkeeper bc8ecd8e67 Add "Reconnect" option under the multiplayer button 2019-05-02 00:26:37 +02:00
Xkeeper d614fb4035 add network indicators for desync/player count 2019-05-02 00:22:03 +02:00
Duncan 1e1d263dae
PlayerSetGroupAction (#9072)
* First pass at action.

* Version 2. Do all the work in Network.cpp

* Mark game command as complete

* Make requested changes

* Increment of network version
2019-05-01 16:54:12 +01:00
ζeh Matt c5b66c0294 Fix #9152: Spectators can modify ride colours 2019-04-29 20:08:09 +02:00
Hielke Morsink bcaa856911
Merge pull request #9089 from Broxzier/bugfix/9083-ghost-banner-index
Fix #9083: Wrong sign index is set for clients
2019-04-21 10:26:05 +02:00
Michael Steenbeek 42a1a8704d
Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
Hielke Morsink 71af88fc5c Bump network version 2019-04-20 14:47:45 +02:00
Hielke Morsink 70fc620ebe Fix #9083: Wrong sign index is set for clients
This issue was caused by the ghost for banners, which already create an entry on the banner. The game command is then received while the ghost still exists, giving the placed banner another ID.
This fix is basically a copy of the fix that is also `game_do_command_p` that tackles this same issue.
2019-04-16 20:26:42 +02:00
Duncan 2515f8d6d2
Merge pull request #9082 from duncanspumpkin/fix_9079
Fix 9079
2019-04-09 20:05:38 +01:00
Duncan e01b5f908a
Merge pull request #9070 from ZehMatt/fix-9068
Fix #9068: Unable to place staff or peeps during multiplayer
2019-04-09 20:05:21 +01:00
duncanspumpkin 0ffa6d1ae5 Increment network version 2019-04-09 18:46:31 +01:00
duncanspumpkin 2e104a00c8 Increment network version 2019-04-08 17:19:58 +01:00
Matt 7c901addc6 Fix #9068: Unable to place staff or peeps during multiplayer 2019-04-07 14:12:23 +02:00
duncanspumpkin 57efe286cf Increment network version 2019-04-07 12:24:02 +01:00
duncanspumpkin 09875311b3 Increment network version 2019-04-02 18:36:57 +01:00
Michael Steenbeek b618bbdcd4
Implement GameAction for setting date 2019-03-31 19:48:51 +02:00
ζeh Matt 521b78390f Fix #8909: Potential crash when invoking game actions as server 2019-03-31 14:42:47 +02:00
duncanspumpkin 9b4bc97826 Increment network version 2019-03-27 18:49:19 +00:00
ζeh Matt 31d32caf8c Fix #8972: Master server unable to query game info 2019-03-27 11:30:41 +01:00
Michael Steenbeek d88d80335d
Fix #8882: Submarine Ride does not count as indoors (#8964) 2019-03-27 10:09:14 +01:00
Nazey 047fa65a66 Fix #8942: Water level is raised abnormally (#8971) 2019-03-26 17:34:30 +01:00
ζeh Matt d41822e0f5 Network relevant player info on changes 2019-03-24 23:16:57 +01:00
Duncan 791c3059f6 Add ParkEntranceRemove GameAction 2019-03-24 21:41:14 +01:00
Matt c0cd1aaef3 Exclude host from rate limiting. 2019-03-22 08:06:54 +01:00
Matt 7be312c4c6 Implement rate limiting times for game actions. 2019-03-22 08:06:54 +01:00
Gymnasiast 511dd44f6b Bump network version 2019-03-20 16:57:22 +01:00
Michael Steenbeek 68aa5122fa
Fix #6006: Objects higher than 6 metres are considered trees 2019-03-18 22:56:14 +01:00
duncanspumpkin aa2f0a46d0 Increment network version 2019-03-18 20:01:30 +00:00
Matt 57283a4e2b Fix #8900: Implement GuestSetFlagsAction. 2019-03-17 22:17:04 +01:00
Michael Steenbeek 8bf693983a
Fix #7884: Unfinished preserved rides can be demolished with quick demolish 2019-03-17 16:55:17 +01:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
ζeh Matt 3b69c1c75e Fix #8055: Ignore rendering specific fields for sprite checksum. (#8895) 2019-03-16 21:53:26 +01:00
duncanspumpkin 0c46475d07 Increment network version 2019-03-15 20:12:10 +00:00
Matt 3c8480ee26 Remove unused variables and strip unused DEBUG_DESYNC paths. 2019-03-14 13:43:49 +01:00
Matt b249928222 Buffer tick data so client can catch up. 2019-03-14 13:43:49 +01:00
Matt 258f2722d7 Bump up network version. 2019-03-14 13:43:49 +01:00
Matt 8f7cf5fcc9 Check desyncs only when the map is fully loaded. 2019-03-14 13:42:15 +01:00
Matt 7410c4b56c Use real server tick to check desyncs. 2019-03-14 13:42:15 +01:00
Michał Janiszewski 298c9f5238 Release 0.2.2
- Feature: [#4418] Allow steep slopes on the side-friction roller coaster.
- Feature: [#7726] Add shortcut to advance one tick.
- Feature: [#7956, #7964] Add sprite font glyphs for Hungarian and some Czech letters.
- Feature: [#7971] Toolbox option to open custom content folder.
- Feature: [#7980] Allow data path for RCT1 to be specified by a command line argument.
- Feature: [#8073] Auto-upload minidumps to backtrace.io (optional, MSVC/Windows only)
- Feature: [#8078] Add save_park command to in-game console.
- Feature: [#8080] New console variable "current_rotation" to get or set view rotation.
- Feature: [#8098] Glyph for Russian rouble sign.
- Feature: [#8099] Add Powered Launch mode to Inverted RC (for RCT1 parity).
- Feature: [#8190] Allow building footpaths on 'corner down' terrain.
- Feature: [#8191] Allow building on-ride photos and water S-bends on the Water Coaster.
- Feature: [#8259] Add say command to in-game console.
- Feature: [#8374] Add replay system.
- Feature: [#8377] Add option to adjust amount of autosaves to keep.
- Feature: [#8458] Add sprite sorting benchmark.
- Feature: [#8583] Add boosters to water coaster.
- Feature: [#8648] Add optional chat button to top toolbar in multiplayer games.
- Feature: [#8652] Add network window including a graph for data usage visualisation.
- Feature: [#8670] Add ability to download missing objects when loading a park.
- Change: [#7961] Add new object types: station, terrain surface, and terrain edge.
- Change: [#8222] The climate setting has been moved from objective options to scenario options.
- Change: [#8718] Allow TARMAC object to be removed when running the `remove_unused_objects` command.
- Change: [#8718] No longer require the generic scenery groups and tarmac footpath to be checked when creating a scenario.
- Change: [#8734] Disable kick button in multiplayer window when unable to use it.
- Fix: [#3832] Changing the colour scheme of track pieces does not work in multiplayer.
- Fix: [#4094] Coasters with long flat-to-steep pieces offer them in diagonal mode (original bug).
- Fix: [#5684] Player list can desync between clients and server and can crash.
- Fix: [#6191] OpenRCT2 fails to run when the path has an emoji in it.
- Fix: [#7439] Placement messages have mixed strings
- Fix: [#7473] Disabling sound effects also disables "Disable audio on focus loss".
- Fix: [#7536] Android builds fail to start.
- Fix: [#7689] Deleting 0-tile maze gives a MONEY32_UNDEFINED (negative) refund.
- Fix: [#7828] Copied entrances and exits stay when demolishing ride.
- Fix: [#7945] Client IP address is logged as `(null)` in server logs.
- Fix: [#7952] Performance drop caused by code refactor.
- Fix: [#7954] Key validation fails on Windows due to non-ASCII user / player name.
- Fix: [#7975] Inspection flag not cleared for rides which are set to never be inspected (original bug).
- Fix: [#7985] Giant Screenshot ignores 'Map rendering' settings.
- Fix: [#7987] Broken track designs increase money by MONEY32_UNDEFINED.
- Fix: [#7991] Scenery and footpaths on Construction Rights tiles can be deleted using Clear Scenery.
- Fix: [#8034] Vanilla sprites are broken when making screenshots from command line.
- Fix: [#8045] Crash when switching between languages.
- Fix: [#8062] In multiplayer warnings for unstable cheats are shown when disabling them.
- Fix: [#8090] Maze designs saved incorrectly.
- Fix: [#8101] Title sequences window flashes after opening.
- Fix: [#8120] Crash trying to place peep spawn outside of map.
- Fix: [#8121] Crash Renaming park with server logging enabled.
- Fix: [#8139] Buying land costs money when the game is in "no money" mode.
- Fix: [#8141] Attempting to build entrance/exit on station 2 does not work.
- Fix: [#8142] Reliability of mazes and crooked houses can go below 100%.
- Fix: [#8187] Cannot set land ownership over ride entrances or exits in sandbox mode.
- Fix: [#8200] Incorrect behaviour when removing entrances and exits that are on the same tile.
- Fix: [#8204] Crash when tile element has no surface elements.
- Fix: [#8264] Rides and scenery placeable outside of map with ZC and Sandbox mode enabled.
- Fix: [#8335] Rides with arbitrary ride types can crash the game when they break down.
- Fix: [#8358] Infinite loop when changing vehicle count on stopped ride.
- Fix: [#8402] Crash closing a window in some cases.
- Fix: [#8431] Crash when game action logging is enabled.
- Fix: [#8433] Crash if master server response is not valid JSON.
- Fix: [#8434] Crash if curl_easy_init fails.
- Fix: [#8443] Crash when selecting the current vehicle for ride that has none available.
- Fix: [#8456] Junior booster track piece doesn't connect properly.
- Fix: [#8464] Crash on game shutdown.
- Fix: [#8469] Crash modifying colour on hacked rides.
- Fix: [#8508] Underground roto-drop is not going up.
- Fix: [#8555] Multiplayer window text limits are not computed properly.
- Fix: [#8572] Steel Twister track pieces ID 64 and 65 drawn incorrectly.
- Fix: [#8585] Part of track missing on air powered vertical coaster.
- Fix: [#8588] Guest list scrolling breaks above ~2000 guests.
- Fix: [#8591] Game loop does not run at a consistent tick rate of 40 Hz.
- Fix: [#8647] Marketing campaigns check for entry fees below £1 (original bug).
- Fix: [#8653] Crash when peeps attempt to enter a ride with no vehicles.
- Fix: [#8720] Desync due to boats colliding with ghost pieces.
- Fix: [#8739] Savegame from original game crashes when cruising through map.
- Fix: [#8742] Access violation in vehicle_update_sound_params.
- Fix: [#8804] Raising water shows money effect at the bottom rather than new height.
- Fix: [#8811] Some fields in the sv6 save file not being copied correctly.
- Fix: [#8824] Invalid read in footpath_chain_ride_queue.
- Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only).
- Improved: [#7730] Draw extreme vertical and lateral Gs red in the ride window's graph tab.
- Improved: [#7930] Automatically create folders for custom content.
- Improved: [#7980] Show the full path of the scenario in the scenario select window.
- Improved: [#7993] Allow assigning a keyboard shortcut for opening the tile inspector.
- Improved: [#8107] Support Discord release of RCT2.
- Improved: [#8491] Highlight entrance and exit with different colours in track design previews.
- Improved: Almost completely new Hungarian translation.
- Removed: [#7929] Support for scenario text objects.
2019-03-13 21:51:10 +01:00
duncanspumpkin 0b989710b5 Increment network version 2019-03-09 18:08:20 +00:00
Matt e9523caeb4 Bump up network version. 2019-03-09 13:58:49 +01:00
Matt d7a4570a1c Fix #8802: public key signature being null terminated. 2019-03-09 13:58:23 +01:00
duncanspumpkin cfeeeab9b9 Increment network version 2019-03-04 16:58:57 +00:00
duncanspumpkin 510d71ab68 Add FootpathSceneryPlaceAction 2019-03-04 16:57:21 +00:00
Aaron van Geffen a6773584b0 Amend changelog; increase network version. 2019-03-03 12:09:19 +01:00
duncanspumpkin 47de289ca2 Increment network version 2019-03-02 16:06:44 +00:00
duncanspumpkin 87a21d6cda Increment network version 2019-03-02 07:25:28 +00:00
ζeh Matt 4805c1c082
Merge pull request #8801 from ZehMatt/mp-playerinfo
Synchronize player info
2019-02-28 20:41:00 +01:00
Ted John cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
Matt d14b07a748 Bump up network version. 2019-02-28 20:15:32 +01:00
Matt 0000e9741f Fix #8798: Player info not being synchronized over network. 2019-02-28 20:15:11 +01:00
duncanspumpkin 6c91d54255 Increment network version 2019-02-28 09:13:11 +00:00
duncanspumpkin de1ec264b0 Increment network version 2019-02-28 08:03:00 +00:00
duncanspumpkin cbb02ec98a Use game action for track design. Fix error titles.
Add files to xcode project (#20)

Finally get the placement code working

Use game action for ghosts. Fix basequarter

Remove references to old command

Fix formating remove unused var

Fix clang format
2019-02-27 18:51:54 +00:00
jensj12 89066759eb Fix #8264: Rides and scenery placeable outside of map with ZC and Sandbox mode enabled (#8715)
* Fix #8264: Rides and scenery placeable outside of map with ZC and Sandbox mode enabled

map_can_construct_with_clear_at first checks whether it is inside the map, and then checks gCheatsDisableClearanceChecks, making earlier checks for gCheatsDisableClearanceChecks unnecessary.

* Increase network version
2019-02-27 18:46:18 +00:00
duncanspumpkin c68af628c2 Increment network version 2019-02-27 10:18:52 +00:00
duncanspumpkin 5facc32100 Increment network version 2019-02-26 08:15:32 +00:00
Duncan 94b5133388
Merge pull request #8737 from duncanspumpkin/load_or_quit_ga
Add LoadOrQuitAction
2019-02-25 11:28:57 +00:00
Michael Steenbeek ec2d609200
Merge pull request #8734 from Broxzier/feature/multiplayer-tweaks
Disable kick button when unable to use it + slight refactor
2019-02-25 10:34:56 +01:00
ζeh Matt 92b6ed5a94
Merge pull request #8751 from ZehMatt/fix-8741
utf8* string refactor.
2019-02-24 17:33:37 +01:00
Duncan 6a0cff2676 Fix being unable to refund when in negative money 2019-02-24 17:31:43 +01:00
Matt a7f8c8aa36 Refactor utf8* use over std::string 2019-02-24 00:08:05 +01:00
duncanspumpkin b60d97ef55 Use enum values for the savePromptMode 2019-02-22 09:08:04 +00:00
duncanspumpkin c24c6bdf0a Remove references to old game command 2019-02-22 09:01:39 +00:00
duncanspumpkin eadef45ffd Add LoadOrQuiteAction 2019-02-22 09:00:38 +00:00
Hielke Morsink d460443305 Introduce network permission enum
This enum needs to match the vector. To make sure their sizes are equal,
the vector has been changed to an std::array.
2019-02-21 19:50:07 +01:00
duncanspumpkin 71bdd28022 Increment network version 2019-02-21 16:00:31 +00:00
duncanspumpkin 768321c517 Increment network version 2019-02-20 19:14:24 +00:00
duncanspumpkin d959657346 Increment network version 2019-02-19 15:22:29 +00:00
ζeh Matt 8a6dd5c4dd Fix #8720: Desync due to boats colliding with ghost pieces 2019-02-19 11:39:48 +01:00
Matt d7ff3854a9 Bump up network version. 2019-02-18 17:20:18 +01:00
Matt 3f07fd6bed Bump up network version. 2019-02-17 10:12:02 +01:00
Matt 16e371c792 Bump up network version. 2019-02-15 09:01:38 +01:00
ζeh Matt d143c7b7c6 Fix 8698 (#8709) 2019-02-14 22:09:16 +01:00
duncanspumpkin af65bc33e7 Increment network version 2019-02-11 10:57:58 +00:00
duncanspumpkin 866d143930 Move Pause Toggle into the GameAction framework 2019-02-11 10:46:12 +00:00
Michael Steenbeek 76603ad1b3
Fix #8696: Setting land height costs money in no-money scenarios 2019-02-10 22:14:23 +01:00
ζeh Matt be491d3c6f Bump network version 2019-02-09 23:27:26 +01:00
duncanspumpkin 640337159a Increment network version 2019-02-08 14:08:55 +00:00
Ted John 907e43acd8
Merge pull request #8670 from IntelOrca/feature/download-objects
Auto-download missing objects
2019-02-08 12:55:05 +00:00
ζeh Matt 436f15f22e
Merge pull request #8692 from ZehMatt/gameaction-things
Handle unregistered game actions with error logging.
2019-02-07 23:39:11 +01:00
Ted John 3aa55ff875 Refactor and improve download of objects 2019-02-07 21:59:15 +00:00
Ted John 27f70e3656 Get basic object downloading working 2019-02-07 21:58:34 +00:00
ζeh Matt f5e24bd973
Merge pull request #8652 from ZehMatt/network-window
Network window
2019-02-07 21:10:03 +01:00
Duncan d03bd95598
Register the ride set appearance action to prevent server crash (#8691)
* Register the ride set appearance action to prevent server crash

* Bump network version

* Copy the type back when deserialising

This should really be fixed by adding RideSetAppearanceType to the dataserialiser

* Switch the types to prevent possible serialiser issues
2019-02-07 19:53:09 +00:00
Matt ecd4f61115 Add Network window 2019-02-07 18:50:58 +01:00
Matt 2931ac6e31 Track bytes sent and received in Network. 2019-02-07 18:50:58 +01:00
Matt 1553cf8c58 Bump up network version. 2019-02-07 18:36:44 +01:00
Matt b071be49bd Add checks for unregistered game actions and report errors. 2019-02-07 18:35:03 +01:00
duncanspumpkin 5e319a4a37 Increment network version 2019-02-07 10:16:20 +00:00
Duncan b27923093c Fix #7987: Broken track designs increase money by MONEY32_UNDEFINED 2019-02-06 22:20:42 +01:00
duncanspumpkin 752df2607a Increment network version 2019-02-05 20:39:53 +00:00
duncanspumpkin 8a69b89df6 Move Staff Set Orders into game action framework.
Split up costume and order game commands
2019-02-05 20:38:18 +00:00
Duncan c436a656ad
Merge pull request #8666 from cgdolan/develop
Implement game action for sign set style
2019-02-05 20:35:11 +00:00
Christopher G. Dolan 19a58fa5fe Fix format, move validation logic to query, update network version 2019-02-04 17:30:45 -08:00
Michał Janiszewski 8a395e3706
Fix misaligned access (#8665)
Platforms like ARM are very sensitive to unaligned access. This change
makes sure the addresses obey the C++ standard and are properly aligned.
2019-02-04 23:15:14 +01:00
Michał Janiszewski 604da7ce01
Merge pull request #8661 from tomlankhorst/refactor-random
Refactor random engine
2019-02-03 23:29:10 +01:00
Tom Lankhorst 16691b22ba
Use state struct 2019-02-01 19:29:43 +01:00
Tom Lankhorst 6a42a95495
Refactor random engine
Introduce RotateEngine and Rct2Engine, FixedSeedSequence and Rct2Seed.
Adhere respectively to requirements `RandomNumberEngine` and `SeedSequence`.
Can be used with C++11 adaptors and distributions in <random>.
2019-02-01 14:32:04 +01:00
Matt 4026ead774 Fix #8653: crash when peeps attempt to enter a ride with no vehicles. 2019-01-30 13:16:45 +01:00
Tom Lankhorst 0233795add Fix #8642: Likely mistake in entrance fee check 2019-01-28 11:15:49 +01:00
Michael Steenbeek 247e89eb53
Revert duck fix 2019-01-24 10:40:04 +01:00
deurklink 5e39147b76 Fix #8584: Ducks spawning function doesnt check tiles 0..63 (original bug) (#8614) 2019-01-20 13:20:01 +01:00
ζeh Matt a34422dc26 Fix #8591: Game loop does not run at a consistent tick rate of 40 Hz (#8594)
* Fix #8591: Run game loop at consistent tick rate of 40hz.

* Update distribution/changelog.txt

Co-Authored-By: ZehMatt <m.moninger.h@gmail.com>
2019-01-17 23:22:27 +01:00
deurklink 51fc2fe84a Feature #8583: Add booster pieces for water coaster
Co-Authored-By: deurklink
2019-01-14 22:17:52 +01:00
Michał Janiszewski 0d2fd33fd8 Bump network version
Co-Authored-By: ZehMatt <m.moninger.h@gmail.com>
2019-01-07 09:04:51 +01:00
Ted John 0328355f9e Include stdexcept instead of exception (#8559) 2019-01-05 22:12:47 +01:00
Michał Janiszewski c5e1abcfb1 Fix implicit fallthroughs 2019-01-02 22:30:57 +01:00
Matt 6e2514cd0d Refactor sprite_checksum, returns rct_sprite_checksum now. 2018-12-29 19:23:27 +01:00
Michał Janiszewski 54403aca06 Fix the no-HTTP builds 2018-12-28 22:27:33 +01:00
Michael Steenbeek 2530cd1ac3
Fix #8426: Queue banner left behind after ride demolition 2018-12-22 15:34:17 +01:00
Michael Steenbeek 65dcdf77ea
Fix #8508: Underground roto-drop is not going up 2018-12-22 11:56:00 +01:00
ζeh Matt b572fffafa
Merge pull request #8457 from ZehMatt/refactor/game-action-name
Automatically expose game action name via macro.
2018-12-20 23:17:49 +01:00
Matt 4ff2dbd108 Automatically expose game action name via macro. 2018-12-20 22:20:58 +01:00
ζeh Matt 7568123a9d Fix #8482: Pending player list not being reset. (#8483) 2018-12-19 20:34:41 +01:00
ζeh Matt 183e508c4d
Merge pull request #8465 from ZehMatt/fix-8464
Fix #8464: Crash on game shutdown.
2018-12-18 00:55:22 +01:00
Michał Janiszewski ea61be5ebe
Prevent logging from using already-freed game command (#8473)
gc variable is held by reference in the scope above, pointing to the
queue's beginning.
2018-12-17 23:56:01 +01:00
Matt 8e2e60b117 Fix #8464: Crash on game shutdown. 2018-12-17 23:51:43 +01:00
ζeh Matt 7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Gymnasiast 748da25f78 Fix omission from #8453 2018-12-15 21:34:14 +01:00
Gymnasiast 600d32807d Fix #8033: Crash when placing 64th sign 2018-12-15 20:34:28 +01:00
Ted John fecf4ac3e8 Fix #8434: Crash if curl_easy_init fails 2018-12-14 17:10:50 +00:00
Michael Steenbeek cf44ea7e24
Fix #3832: Track piece colour scheme paint not network-safe 2018-12-11 22:17:52 +01:00
roosen5 d9806305b0 Fix #8358: infinite loop when changing vehicle count on stopped ride. (#8375)
The sprite_remove in Sprite.cpp tries to find itself inside the quadrant.
It does not find itself, and because the rest of the code assumes that it will always find it
The normal code tries to set the value of the next_in_quadrant so that whoever points at it, will now point at its next sprite.
But because it didn't find whoever was pointing to it, it would set the pointer to SPRITE_INDEX_NULL to its next sprite.
This would lead to cycles in the linked list

The reason that the sprite was not found is that during the entry of a ride, the position of a peep is set to LOCATION_NULL
Exiting a ride sets it back to whatever the location is of an exit.
However stopping a ride that still has people in it would go wrong, as the people are removed from the ride through ride_remove_peeps

This function was called during the PaintWindows.
The fact that this function is called during the painting is the problem, because of the tweening:
Before painting all the positions are stored (Which would at that point be the LOCATION_NULL), during the painting
the peep would be removed from the ride, setting their location to the enrance/exit
After painting is done all the positions are restored again, so the patched position is forgotten and then it would be
removing a sprite with location LOCATION_NULL and that goes wrong

The fix is to have the window update outside of paint
2018-12-09 20:46:04 +01:00
ζeh Matt 04af3932ac Fix #5684: Refactor player list updates being bound on ticks. (#8399) 2018-12-09 20:39:44 +01:00
Michael Steenbeek a9a583dcd1
Fix #8200: Incorrect behaviour when removing entrances/exits on the same tile 2018-11-27 22:59:31 +01:00
Hielke Morsink 354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
ζeh Matt 1abb31a159 Implement game action logging. (#8138) 2018-11-20 06:04:42 +01:00
Michał Janiszewski 0d2751a54e
Hide the network class declaration to Network.cpp (#8276)
The Network class is not used by anyone other than free functions in
Network.cpp, nor should it be used by anyone with the current design.

This change leaves only the publicly-exposed functions left in the
header, drastically reducing amount of required headers in network.h,
one of the heaviest headers we had so far.
2018-11-19 23:10:54 +01:00
Michael Steenbeek 82aba96728 Cheats: use 'weather' instead of 'climate' (#8246) 2018-11-10 14:30:41 +01:00
Hielke Morsink fb5343114e format NetworkActions::Actions 2018-11-08 23:45:40 +01:00
Hielke Morsink b45fabdc7d Add new action to 'edit scenario options' permission 2018-11-08 23:44:51 +01:00
Hielke Morsink 107faaf821 Add and use game action for setting the climate
Also reordered the registered game actions the same as headers, so they are easier to find.
2018-11-08 22:39:13 +01:00
Michael Steenbeek df768a3fad
Fix #8201: Only quarter scenery objects in one corner can be painted 2018-11-05 20:12:22 +01:00
Felix Pelletier 0cd7f1e07c Fix #8142: Reliability of unbreakable rides can go below 100% 2018-11-02 09:04:27 +01:00
Michael Steenbeek f55f323723
Allow building footpaths on 'corner down' terrain 2018-11-01 11:04:32 +01:00
Michael Steenbeek a8f526ae48
Allow on-ride photos and water S-bends on the Water Coaster 2018-11-01 10:12:45 +01:00
Hielke Morsink 698426dad7 Increase network version to avoid conflicts (#8194)
#8053 bumped the network version to 3, which we already had before but was reverted.
2018-10-31 20:47:35 +01:00
Michael Steenbeek 687fbc2a0a Modify game_command_set_scenery_colour() to only take the scenery quadrant 2018-10-31 13:10:26 +01:00
Michael Steenbeek 15490010e1 Revert "Fix #8064: Prohibited high construction error is sometimes shown as (undefined string)"
This reverts commit a8e46f5eec.
2018-10-23 14:52:51 +02:00
ζeh Matt a8e46f5eec Fix #8064: Prohibited high construction error is sometimes shown as (undefined string) 2018-10-21 20:51:41 +02:00
Berbe 102a2ee234 Add player hash to server log message on join (#7946) 2018-10-15 21:40:22 +02:00
Berbe 30f6d2b31f Correct client IP address not being propagated/stored 2018-10-04 12:27:38 +01:00
LRFLEW c41f862920 Fix some memory leaks 2018-10-04 09:42:22 +02:00
Michael Steenbeek 28e8b4e12b Modify game_command_remove_scenery to take unshifted scenery quadrant 2018-10-03 12:31:02 +02:00
Lars Toenning d0e318a2a2 Removed unnecessary null-pointer-check (#8013) 2018-09-22 16:52:29 +02:00
Ted John 900465a392 Don't attempt to load server list if file doesn't exist 2018-09-18 12:50:34 +01:00
deurklink a5cbcb448c Fix #7975: Clear inspection due flag when interval set to Never 2018-09-07 13:08:26 +02:00
Matt 8c6f6a18ab Remove unused passing of object manager. 2018-08-31 07:18:50 +02:00
Matt 04928d4b84 Refactor reference over std::shared_ptr. 2018-08-31 07:18:48 +02:00
Michał Janiszewski 8ac731e212 Release 0.2.1
- Feature: [#5993] Ride window prices can now be set via text input.
- Feature: [#6998] Guests now wait for passing vehicles before crossing railway tracks.
- Feature: [#7658] Add option to always use system file browsing window.
- Feature: [#7694] Debug option to visualize paths that the game detects as wide.
- Feature: [#7713] The virtual floor now takes land ownership rights into account.
- Feature: [#7771] Danish translation.
- Feature: [#7797, #7802, #7821, #7830] Add sprite font glyphs for Danish, Norwegian, Russian, Turkish, Catalan and Romanian.
- Feature: [#7848] Add a master volume slider to audio options screen.
- Feature: [#7868] Placing scenery while holding shift now scales appropriately with zoom levels.
- Feature: [#7882] Auto-detect Steam and GOG installations of RCT1.
- Feature: [#7885] Turkish translation.
- Fix: [#3177] Wrong keys displayed in shortcut menu.
- Fix: [#4039] No sprite font glyph for German opening quotation mark.
- Fix: [#5548] platform_get_locale_date_format is not implemented for Linux.
- Fix: [#7204] Object source filters do not work for RCT1, AA and LL.
- Fix: [#7440] Memory leak. All system memory used.
- Fix: [#7462] Guest window goes beyond the map edge on a spiral slide.
- Fix: [#7533] Screenshot is incorrectly named/file is not generated in CJK language.
- Fix: [#7628] Always-researched items can be modified in the inventory list.
- Fix: [#7643] No Money scenarios with funding set to zero.
- Fix: [#7653] Finances money spinner is too narrow for big loans.
- Fix: [#7673] Vehicle names are cut off in invention list.
- Fix: [#7674] Rides show up as random numbers in guest's ride list.
- Fix: [#7678] Crash when loading or starting a new game while having object selection window open.
- Fix: [#7683] 'Arbitrary ride type' dropdown state is shared between windows.
- Fix: [#7697] Some scenery groups in RCT1 saves are never invented.
- Fix: [#7711] Inverted Hairpin Coaster allows building invisible banked pieces.
- Fix: [#7734] Title sequence not included in macOS builds as of 0.2.0 release.
- Fix: [#7756] Steam RCT2 path not correctly checked on macOS and Linux.
- Fix: [#7765] Crash when opening ride list window on Windows Vista.
- Fix: [#7773] Once research has been completed, player is still charged for research.
- Fix: [#7786] Crash when importing a track design.
- Fix: [#7793] Duplicate private keys generated.
- Fix: [#7817] No sprite font glyph for interpunct.
- Fix: [#7823] You can build mazes in pause mode.
- Fix: [#7804] Russian ride descriptions are cut off.
- Fix: [#7872] CJK tooltips are often cut off.
- Fix: [#7895] Import of Mega Park and the RCT1 title music do not work on some RCT1 sources.
- Improved: [#7899] Timestamps in the load/save screen are now displayed using local timezone instead of GMT.
- Improved: [#7918] Better RCT2 detection if both disc and GOG/Steam versions are installed.
2018-08-26 22:20:13 +02:00
Matt 673d9861ee Bump up network version. 2018-08-23 13:29:04 +02:00
Linus Unnebäck fd07be587a
Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
ζeh Matt 228861c95f Release memory from json_dumps and decrement references (#7836) 2018-08-12 11:46:30 +02:00
ζeh Matt b2005c3b9f Implement FootpathRemoveAction as a GameAction (#7867) 2018-08-12 10:31:00 +02:00
Sijmen Schoon faa5cc2472 Fix #7823: You can build mazes while paused 2018-08-03 21:58:49 +02:00
clang-format d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +02:00
clang-format b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
Hielke Morsink fdc6e52da1 Correct formatting in files from network to paint 2018-07-23 16:00:15 +02:00
clang-format e32189fd98 clang-format network 2018-07-23 16:00:05 +02:00
Michał Janiszewski 10f6059f09
Fix #7793: Duplicate private keys generated (#7794) 2018-07-18 22:11:34 +01:00
Michał Janiszewski 13224104e4
Ensure HTTP request variables lives till it is used (#7744)
Solves https://www.reddit.com/r/openrct2/comments/8uftdh/
2018-06-28 22:23:21 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek ec3a1e575e
Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +02:00
Michał Janiszewski 41b2168824 Fix namespace unused with HTTP disabled 2018-06-19 22:41:33 +02:00
Ted John 182bc1afe6 Fix #7696: Servers do not get registered on master server list
Correct the HTTP method used for the heartbeat request.
2018-06-16 22:37:23 +01:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00