Commit Graph

918 Commits

Author SHA1 Message Date
Matt 4cede91424 Introduce NetworkClient and NetworkServer 2020-07-30 20:29:15 +02:00
Matt cf1fb9ecff Move some types into NetworkTypes.h 2020-07-30 20:29:15 +02:00
Matt 37f6a11a1f Move Network declaration into header and rename to NetworkBase 2020-07-30 20:29:15 +02:00
ζeh Matt 8490e87eeb
Close #12422: Refactor NETWORK_COMMAND to use strong enum (#12481)
* Refactor NETWORK_COMMAND to strong enum

* Refactor all uses of NETWORK_COMMAND

Closes #12422
2020-07-28 17:24:40 +01:00
Matt 4b587e3989 Minor cleanup 2020-07-25 16:02:26 +02:00
Matt ab48c00a89 Fix client being stuck on empty object list 2020-07-25 15:23:26 +02:00
Matt 241ff111dd Address reviews 2020-07-25 14:10:01 +02:00
Matt 6c40d9f3d5 Fix formatting 2020-07-24 23:11:28 +02:00
Matt e31317e025 Rename function to be consistent 2020-07-24 23:11:28 +02:00
Matt d230bc8914 Bump up network version 2020-07-24 23:11:28 +02:00
Matt 908090104a Send client heartbeats to keep connection alive 2020-07-24 23:11:28 +02:00
Matt 1eedaf32dd Refactor sending the object list including status reporting 2020-07-24 23:11:28 +02:00
Matt 0f31b82af0 Add missing network command 2020-07-24 23:11:28 +02:00
Matt 8ef5d0e838 Rename some things to clarify purpose, add constant for map requests 2020-07-24 23:11:12 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax a961d9784f
Part of #12243: Use coords for MazeRemoveTrack (#12251) 2020-07-15 23:34:26 -03:00
Jim 0248621502
Increase handyman randomness in queue (#12145)
* Increase randomness when handyman is on queue path

* Add myself to contributors

* Refactor hex variable probabilities

* Add check if queue is connected to a ride

* Update changelog

* Bump network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-07-08 19:48:08 +01:00
Gymnasiast 7cc510f6b7
Increment network version 2020-07-07 21:14:16 +02:00
frutiemax bee0b4b82d
Part of #11159: Optimize util_zlib_deflate return (#12111) 2020-07-04 09:21:50 -03:00
frutiemax 26ae2dbf04
Part of #11437: Move PlatformFileExists to Platform2.h (#12077) 2020-07-02 12:03:31 -03:00
Gymnasiast 2ee21e360c
Bump network version 2020-06-17 21:46:54 +02:00
Irrelevant Irreverent db85f0c78b Bump network version 2020-06-16 09:08:04 -04:00
Duncan b3d77dd6c9
Remove banner entry when deleting tiles with tile inspector (#11880) 2020-06-11 23:42:48 +02:00
Michael Steenbeek 9ef8d6da42
Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
Ted John 8f77125cdb
Fix #11298: Unable to advertise server (500): Retry with ipv4 only (#11824)
Add new config option to allow any address to be advertised. This then
doesn't rely on the master server retrieving the server IP address via
the HTTP request which can often be IPv6 by default.
2020-05-30 18:21:22 +02:00
Gymnasiast 9a9ab47856
Remove Twitch from the rest of the code 2020-05-28 09:28:32 +02:00
tylerleamon 51872f9741
Fix #10634: Guests are unable to use uphill paths out of toilets
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-05-22 19:58:38 +02:00
Tulio Leao b7b5a26a57
Rename ServerList member variables to prevent shadowing 2020-05-15 12:06:41 +02:00
Michael Steenbeek f0bd05cf6d
Part of #11158: Remove more C-style casts (#11743) 2020-05-13 21:22:50 -03:00
Duncan 79dda7260a
Fix #11695. Mechanics walking to 0,0 on entrance only (#11704)
Mistake made when refactoring that meant that null locations were converted into tile 0, 0. I've fixed the general case but it is preferred to try avoid using null states for coordinates if at all possible.
2020-05-11 20:28:40 +02:00
Hummel95 aac55d2cc0
Fix #10876: Peeps spawns can stack and are not removable (#11155) 2020-05-09 16:17:08 +02:00
Michael Steenbeek 3ceecb33f0
Fix #11676: Spiral Roller Coaster has regular lift hill available (#11681) 2020-05-09 13:23:55 +02:00
Duncan 32eb7071a1
Fix #11550: Use std::nullopt instead of empty brace (#11595)
This is technically a gcc bug from the looks of it but since std::nullopt is slightly easier to read I've gone through the codebase and used that over empty braces. In addition noticed a mistake on the scripting viewport get widgetIndex function where it would return an incorrect widgetIndex.
2020-05-02 10:09:12 +02:00
tylerleamon 30e6b475a9
Fix #5451: Guests scream on every descent, no matter how small 2020-05-01 22:05:52 +02:00
Michael Steenbeek fc860e8b6e
Merge pull request #11521 from Gymnasiast/refactor/oein3
Make ResearchItem use ObjectEntryIndex
2020-05-01 13:28:21 +02:00
Michael Steenbeek 7895a6911e
Bump network version 2020-05-01 13:28:11 +02:00
Ted John 3d2a534d3b Fix formatting 2020-04-30 17:12:02 +01:00
Gymnasiast ba66751d35
Bump network version 2020-04-30 12:59:34 +02:00
Ted John ee8a1a86c1 Add comments and null check 2020-04-30 02:18:32 +01:00
Ted John 7897df140d
Update src/openrct2/network/Network.cpp
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-04-30 02:14:33 +01:00
Ted John f642597098 Replace loop with std::find_if 2020-04-30 01:54:12 +01:00
Ted John 297fe537b6 Implement network.sendMessage(msg, players) 2020-04-28 22:02:14 +01:00
Ted John d0154d08e9 Implement network join / leave hooks 2020-04-28 19:33:30 +01:00
Ted John 1f39ac014a Run network.chat hook for server chat messages 2020-04-28 17:31:12 +01:00
Ted John ecce4da6e8 Add ipAddress and publicHashKey properties to player API 2020-04-27 20:50:56 +01:00
Ted John 3c02861c63 Increment network version 2020-04-26 16:01:40 +01:00
Ted John c67962577a Rename __ENABLE_SCRIPTING__ to ENABLE_SCRIPTING 2020-04-26 14:35:08 +01:00
Ted John 2f525e0539 Apply more code review comments 2020-04-26 14:35:07 +01:00
Ted John 4e4379e6ef Start work on custom game actions 2020-04-26 14:35:05 +01:00
Ted John 2890faee0a Change plugin type to just local and remote 2020-04-26 14:35:03 +01:00
Ted John bac91cd563 Allow scripting to be compile-disabled 2020-04-26 14:35:03 +01:00
Ted John a5c8ff920f Add game mutable protection 2020-04-26 14:35:03 +01:00
Ted John dc64d3541d Transfer server-client scripts over network 2020-04-26 14:35:03 +01:00
Ted John c8fbc2e529 Improve chat subscription 2020-04-26 14:35:01 +01:00
Ted John 098348d3c3 Add hooking for chat message 2020-04-26 14:35:01 +01:00
Breno Rodrigues Guimarães ab53ddf59f Avoid fast-forwarding peep into the ride
The code being removed in the patch tries to fast forward a peep into the ride when it is the second peep for a vehicle that is used in pairs. Problem is that funds checking does not happen, so it happens that a peep may pay against its will.
Lets say a rich peep enters in line and a poor peep enters in line right after.
If the price of the ride is such that the rich peep can pay and the poor peep can't, it will be dragged into the ride because funds checking only happened for the first.
The second part of the patch just adjusts we consider the vehicle a full car if the second position is filled.

Add test to verify that a peep is not dragged into a ride it can't pay

This test puts two peeps in a Ferris Wheel. The first peep is rich and the second peep is poor. When they are both in line, the ride price is raised so that the poor peep can't pay.
Make sure the poor peep turns back and leaves the ride.

During development, a mistake in the logic would have broken all rides other than ferris wheels in a way that multiple guests could enter the same car.
Also add a test to make sure that is never broken.
2020-04-25 18:27:33 -03:00
Kevin Strehl 5456899afc
Close #10572: Add cheat to allow building at invalid heights 2020-04-25 01:07:36 +02:00
Michael Steenbeek 62482312fb
Bump network version 2020-04-23 14:44:23 +02:00
Michał Janiszewski 2323cc1596
Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Michał Janiszewski de51d97f70 Remove redundant unreachable breaks 2020-04-21 13:31:01 +02:00
Breno Rodrigues Guimarães 2479256bc1
Adjust Formatter function names according to coding style (#11378) 2020-04-20 18:55:15 -03:00
Breno Rodrigues Guimarães d4a2a98e20
Replacing set_format_arg_on macro in favor of a more C++zy solution (#11350) 2020-04-20 07:10:33 +02:00
frutiemax d3b702603d
Fix #10483: Changing footpath type won't remove the elements on it. (#11306)
Changing footpath type for an existing footpath does not remove elements on it, such as benches, lamps, etc. Also handles changes from and to queue paths properly.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2020-04-19 07:11:15 -03:00
Duncan 6570741a1c
Fix #11343, 11344. Remove all peeps cheat causes a crash/hang (#11345)
* Fix #11343, 11344. Remove all peeps cheat causes a crash/hang

Caused by a refactor.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-04-18 15:43:05 -03:00
Olivier Wervers b71062ce1b
Fix #6530: Make land tools work consistently on park borders (#11181)
Makes all land tools behave the same
2020-04-18 08:19:03 -03:00
Olivier Wervers bb72fd6021
Fix #9029: Set animation frame on doors using the tile inspector (#11206) 2020-04-18 07:43:46 -03:00
duncanspumpkin d75fc6945e Increment network version 2020-04-18 08:16:26 +01:00
Gymnasiast 6c3c857dfa
Release v0.2.6
- Feature: [#10925] Show hovered values on finance charts.
- Feature: [#11013] Ctrl+C copies input dialog text to clipboard.
- Feature: [#11218] load_park command for console
- Feature: [#11272] Option for toggling notifications for 'Ride casualties' and 'Stuck or stalled vehicles'.
- Feature: [#11281] add_news_item command for console
- Feature: [#11300] Add powered launch and reverse incline launched shuttle mode to the Stand-Up Roller Coaster (for RCT1 parity).
- Fix: [#475] Water sides drawn incorrectly (original bug).
- Fix: [#6123, #7907, #9472, #11028] Cannot build some track designs with 4 stations (original bug).
- Fix: [#6238] Invalid tile elem iteration in Guest::UpdateUsingBin
- Fix: [#7094] Back wall edge texture in water missing.
- Fix: [#9719] Hacked walls in RCT1 saves are imported incorrectly.
- Fix: [#10372, #10509, #10806] Lift base sections incorrectly exporting, causing various lift related bugs.
- Fix: [#10928] File browser's date column is too narrow.
- Fix: [#10951, #11160] Attempting to place park entrances creates ghost entrances in random locations.
- Fix: [#11005] Company value overflows.
- Fix: [#11027] Third color on walls becomes black when saving.
- Fix: [#11063] Scrolling position persists when switching tabs in the scenery window.
- Fix: [#11106] Crash on getting invalid vehicle index.
- Fix: [#11126] Cannot place Frightmare track design.
- Fix: [#11208] Cannot export parks with RCT2 DLC objects.
- Fix: [#11230] Seat Rotation not imported correctly for hacked rides.
- Fix: [#11225] Replay manager cannot handle track designs.
- Fix: [#11246] Fix Various Import/Export issues with Boat locations, balloon frame number.
- Fix: [#11258] Properly remove format codes from imported strings.
- Fix: [#11286] Fix banner tooltip colour.
- Fix: Small red gardens in RCT1 saves are imported in the wrong colour.
- Improved: [#11157] Slimmer virtual floor lines.
2020-04-17 16:13:30 +02:00
Fred-1044276 a80905e30d
Implement #11300: Add RCT1 operating modes to Stand-up Roller Coaster 2020-04-16 13:12:43 +02:00
Breno Rodrigues Guimarães 174a480870
Use utf8_remove_format_codes to remove format codes from user strings (#11289)
The previous code used RCT12::RemoveFormatCodes to remove format codes from RCT strings. But that function uses utf8 methods to identify format codes. In this new version, rct2_to_utf8 is called first to obtain an utf8 string, and then utf8_remove_format_codes can be used.
2020-04-15 07:17:43 +02:00
duncanspumpkin b01e9381f7 Update network version. Add changelog entry 2020-04-11 09:07:02 +01:00
Duncan fdf98060cf
Change the spatial insert to make it ordered (#11252)
* Change the spatial insert to make it ordered

This is so that the spatial index can be rebuilt and gauranteed to be in the correct order

* Increment Network Version

* Make review changes

* Remove the gSpriteSpatialIndex from the network

* Use safer get function

* Final little tweak
2020-04-09 10:46:26 +01:00
duncanspumpkin d9ebec6690 Increment network version 2020-04-07 20:19:35 +01:00
Michał Janiszewski 914f68dcef Bump network version after fixes reverted in #11190 are reintroduced 2020-04-06 22:32:27 +02:00
duncanspumpkin 4fcecba5fe Increment Network Version 2020-04-05 12:49:14 +01:00
Gymnasiast cfdc8567f7
Fix #11230: Seat Rotation not imported correctly for hacked rides 2020-04-05 12:29:07 +02:00
Michał Janiszewski 12ab701a0f
Add missing Expenditure type setting in LargeSceneryPlaceAction (#11224)
Claiming first bounty of #11190
2020-04-05 06:45:00 +02:00
Michał Janiszewski 54ae98af68 Increase network version 2020-04-03 09:58:24 +02:00
Michael Steenbeek 1e70c4806e
Fix #11126: Cannot place Frightmare track design (#11186) 2020-04-01 17:37:09 +02:00
Michael Steenbeek c1e2c7cc5a
Fix mistake made in #10579 (#11184) 2020-03-31 20:56:47 +02:00
Michał Janiszewski 4be3050e74
Update network version after #11180 2020-03-31 16:05:50 +02:00
Duncan 2806104db0
Remove peep sort (#11088)
* Remove peep sort. No longer required.

Peeps are now only sorted in a temporary vector when the staff or guest list is open. This allows for simpler allocation of sprites

* Increment Network Version
2020-03-28 12:37:01 +00:00
Thijs Versfelt 3613c660a0
Fix #11005: Company value overflows (#11012)
* Clamp park value to prevent integer overflow.

* Replace casting with built-in clamping.

* Add changlog entry for #11005.

* Modify casting to prevent skewed company value.

* Increment network version

Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2020-03-27 13:25:16 +01:00
Michael Steenbeek 3f473ec3f0
Fix #6123: Cannot build some track designs with 4 stations (#11031) 2020-03-25 14:20:29 +01:00
Michał Janiszewski 4f6e77e30a Release 0.2.5
- Feature: [#3154] Use a random title sequence each time it is shown.
- Feature: [#6553] Android version now runs in full screen.
- Feature: [#7865] Transport rides can now be synchronised.
- Feature: [#9073] Shortcut keys for the Tile Inspector.
- Feature: [#10305] Add two shortcuts for increasing and decreasing the scaling factor.
- Feature: [#10189] Make Track Designs work in multiplayer.
- Feature: [#10357] Added window for scenery scatter tool, allowing for area and density selection.
- Feature: [#10637] Console command to remove all floating objects.
- Change: [#1164] Use available translations for shortcut key bindings.
- Change: [#10997] Speed is automatically reset to normal upon scenario completion.
- Fix: [#2485] Hide Vertical Faces not applied to the edges of water.
- Fix: [#5249] No collision detection when building ride entrance at heights > 85.5m.
- Fix: [#6766] Changelog window doesn't open on some platforms.
- Fix: [#7784] Vehicle tab takes 1st car colour instead of tab_vehicle's colour.
- Fix: [#7854] Cannot build a custom spiral roller coaster design.
- Fix: [#7854] Empty entries in spiral roller coaster designs list.
- Fix: [#8151] Game freezes upon demolishing mazes at odd heights.
- Fix: [#8875] RCT1 competition scenarios are classified incorrectly.
- Fix: [#10176] Mistake in the sprite for the land tool's 6x6 grid.
- Fix: [#10196] Doors unable to be placed at end of track corners.
- Fix: [#10228] Can't import RCT1 Deluxe from Steam.
- Fix: [#10313] Path furniture can be placed on level crossings.
- Fix: [#10325] Crash when banners have no text.
- Fix: [#10376] No ratings generated when a shop and track intersect.
- Fix: [#10420] Money effect causing false positive desync.
- Fix: [#10477] Large Scenery cannot be placed higher using SHIFT.
- Fix: [#10489] Hosts last player action not being synchronized.
- Fix: [#10543] Secondary shop item prices are not imported correctly from RCT1 saves.
- Fix: [#10547] RCT1 parks have too many rides available.
- Fix: [#10587] Update last action coordinates on correct player.
- Fix: [#10631] Game bugs out and crashes if you get too many stations via copying stations with the tile inspector.
- Fix: [#10662] Duck cheat tooltips look odd and do not explain anything.
- Fix: [#10694] The lift hill speed of the flying roller coaster cannot be changed (original bug).
- Fix: [#10705] Apply multithreaded rendering to all viewports.
- Fix: [#10739] Mountain tool overlay for even-numbered selections.
- Fix: [#10752] Mute button state not correctly set at startup.
- Fix: [#10822] Can place too many peep spawns.
- Fix: [#10898] Banner text has an offset in tile inspector window.
- Fix: [#10904] RCT1/LL-scenarios with red water won't open.
- Fix: [#10941] The Clear Scenery tool gives refunds for ghost elements.
- Fix: [#10963] Light effects are drawn off-centre in some rotations.
- Fix: [#10993] Bottom toolbar not refreshing when a guest leaves the park.
- Fix: [#11001] Rides list does not use natural sorting.
- Fix: [objects#54] Stage Coach cars are not considered covered by the game.
- Fix: [objects#56] Handymen cut grass incorrectly.
- Improved: [#682] The staff patrol area is now drawn on the water, instead of on the surface under water.
- Improved: [#10858] Added horizontal grid lines to finance charts.
- Improved: [#10884] Added y-axes and labels to park window charts.
- Improved: [#10970] Introduced optional light effects for vehicles at night.
- Removed: [#6898] LOADMM and LOADRCT1 title sequence commands (use LOADSC instead).
2020-03-24 21:46:30 +01:00
Michael Steenbeek ab50c888ff
Merge pull request #10981 from Gymnasiast/fix/8151
Fix #8151: Game freezes upon demolishing mazes at odd heights
2020-03-20 21:38:12 +01:00
Gymnasiast cd18697d31
Bump network version 2020-03-20 21:37:57 +01:00
Michael Steenbeek ef1906d452
Use constants for max sprites and spatial index (#10983) 2020-03-20 20:16:38 +01:00
Michael Steenbeek cb40a726ad
Bump network version 2020-03-19 10:49:18 +01:00
Michael Steenbeek 25358374b2
Bump network version 2020-03-16 19:45:39 +01:00
Michael Steenbeek de6e6e9d8f
Bump network version 2020-03-12 22:45:40 +01:00
Michael Steenbeek bc3d87e476
Bump network version
https://github.com/OpenRCT2/OpenRCT2/pull/10866 should have bumped this.
2020-03-08 12:50:35 +01:00
Michael Steenbeek e3f5eb7275
Merge pull request #10847 from tupaschoal/const-ref-coords
Prefer const ref to send (Tile)CoordsXY(ZD) over
2020-03-01 14:38:39 +01:00
Tulio Leao 181eaf768d Receive CoordsXYZ by const ref instead of copy 2020-02-29 01:14:05 -03:00
ζeh Matt b86854a259
Fix #10587: Update last action coordinates on correct player (#10845) 2020-02-28 16:23:41 +01:00
ζeh Matt 12ab1e9633
Fix #10713: Correctly encode network ride id over network (#10802)
It byte swapped uint16_t and then during decode byte swapped it as uint32_t, now it always uses uint32_t for ride/player id. I could use the underlying type but that would require to re-create all replays again.

Closes #10713
2020-02-21 18:11:26 +01:00
Michael Steenbeek 1690361b36
Increase size of ride_id_t to 16 bits 2020-02-16 22:21:17 +01:00
Tulio Leao fabef9b050 Modify height search to also affect maze construction 2020-02-10 21:55:19 -03:00
aw20368 c76378bc8b Fix #8064 Ride construction errors shown as (undefined string)
The search for height to build track ended at a half-height, leading to (undefined string) error. Changed to always end at whole height and search as high as possible.
2020-02-10 21:54:26 -03:00
Michael Steenbeek 723f658dbd
Change ride_idnew_t to 16 bit; use it in more places (#10667) 2020-02-10 22:41:49 +01:00
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