Commit Graph

1194 Commits

Author SHA1 Message Date
Duncan d46e4a9bb1
Network serialiser for entities (#14541)
* Start a network serialiser for entities

will be used only for checksums and replay diffs

* Continue work

* Use the new serailser for checksums

* Use new serialiser for replays

* keep compilers happy

* Try create checksum stream

* Fix compiling

* Split off class into seperate file

* Update Xcode project

* Increment network version

* Fix pragma mistake

* Fix none network builds

* Update replays

* Improve ChecksumStream and use FNV internally

* Small cleanups

* satisfy compilers

* Revert change of checksum size to simplfy rerecording

* Zero initialise data

* Fix serialiser

* Update replays again

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
Co-authored-by: Matt <m.moninger.h@gmail.com>
2021-05-09 19:12:44 +01:00
ζeh Matt 08ebc1ab41
Fix #14587: Send queued packets before disconnecting the client (#14596)
* Fix #14587: Send queued packets before disconnecting the client

* Log better information during network authentication
2021-05-09 07:56:20 +01:00
Duncan 8eabdf8c8f
Split guest and staff peep variables (#14462)
* Split guest and staff peep variables

* Move variable location

* Increment network version

* Update replays
2021-04-18 17:48:21 +01:00
Michael Steenbeek bbf33b6577
Fix serialisation of PlaceParkEntranceAction 2021-04-15 21:32:26 +02:00
Duncan a9e1f2e89c
Remove SpriteBase::flags (#14460)
* Remove SpriteBase::flags

* Increment network version

* update replays
2021-04-11 18:02:19 +01:00
Michael Steenbeek 0e327c86e4
Fix ratings calculation taking 30 minutes 2021-04-02 22:57:36 +02:00
A.N 4d3328c7bb
Add preprocessor directives to stop unused variable/function warnings. (#14422) 2021-04-02 14:41:11 +02:00
Duncan b65f12f1cf
Use correct null value (#14421)
* Use correct null value

* Increment network version
2021-04-02 13:13:33 +01:00
Michael Steenbeek 7344b7fbfd
Use 16-bit ride_id_t thoughout and raise RIDE_ID_NULL (#14411)
* Replace RIDE_ENTRY_INDEX_NULL with OBJECT_ENTRY_INDEX_NULL

Ride entries are objects like any other, so there is little point having separate constants.

* Use ride_id_t in many more places

* Change RIDE_ID_NULL to 0xFFFF

* Increment network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-04-01 16:02:57 +01:00
Duncan 619b2afc15
Compute checksum by entity type (#14383)
* Compute checksum by entity type

* Copy only the entity size

* Update replays and network version
2021-03-27 09:36:41 +00:00
Duncan 977d05ba29
Entity type5: Remove peep assigned type (#14380)
* Remove users of AssignedPeepType

* Remove AssignedPeepType

Field no longer required due to changes to EntityType

* Move enum to the RCT12 header

* Increment network version

* Update replays
2021-03-24 08:54:05 +00:00
Duncan ccfa22c230
Entity type4: Remove MiscEntityType and add FountainType (#14344)
* Move jumpingfountain type out of misc entity type

* Remove SubType for MiscEntities as it is no longer required

* Update replays

* Apply review comments

* Increment network version
2021-03-22 21:24:50 +00:00
Maximilian Bottin 6f28914f61
Fix #14296: Allow early scenario completion in multiplayer 2021-03-18 20:30:11 +01:00
Duncan df7a284822
Entity type 2: Remove sprite_identifier (#14334)
* Start changing the underlying type

* Further work

* Complete refactor

* Further cleanup

* Remove pointless check

* Increment network and plugin versions

* Add defaults

* Further defaults

* Fix test paint

* Update replays
2021-03-17 08:04:41 +00:00
Duncan 5474194905
Implement train view and remove linked_list_index (#13956)
* Make train manager view

* Remove linked list index field

* Remove merge mistake

* Fix further rebase errors

* Rename and add comments

* Update replays

* Fix Xcode project

* Increment network version

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-03-15 08:13:00 +00:00
manatails 4fe5b1dc79
Add "Vandals stopped" stat for security guards (#14071)
* Add a stat for security guards: Vandals stopped

* Update src/openrct2-ui/windows/Staff.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

* Update src/openrct2/peep/Guest.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

* No need to update screenCoords at the last line

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Add changelog entry and bump network version

* Update to new UI code

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-03-14 09:18:35 -03:00
Gymnasiast 3f65f282d7
Release v0.3.3
- Feature: [#12110] Add Hybrid Coaster (Rocky Mountain Construction I-Box) track type.
- Feature: [#12999] .sea (RCT Classic) scenarios are now listed in the “New Scenario” dialog.
- Feature: [#13000] objective_options command for console.
- Feature: [#13096] Add Esperanto translation.
- Feature: [#13164] Add 'Objective options' to Cheats menu.
- Change: [#9568] Change lift sounds of Reverser Roller Coaster and Compact Inverted Coaster to better fitting ones.
- Change: [#13160] The lay-out of the Park Cheats tab has been improved.
- Fix: [#1324] Last track piece map selection still visible when placing ride entrance or exit (original bug).
- Fix: [#3200] Close Construction window upon selecting vehicle page.
- Fix: [#4022] Fix Mac cursor offset on launch
- Fix: [#4041] Garbled park option on scenario editor with custom theme.
- Fix: [#4865] Offer an option to disable inhibiting the monitor power.
- Fix: [#5178] Lighting effects cannot be disabled in software mode
- Fix: [#5904] Empty errors on tile inspector base height change.
- Fix: [#6086] Cannot install existing track design with another name.
- Fix: [#6614, #8623] Colours are distorted when using OpenGL with Intel integrated graphics drivers.
- Fix: [#7443] Construction arrows pulse at irregular intervals.
- Fix: [#7518] Water isn't cut down by view clipping tool.
- Fix: [#7748] Tooltips would not timeout for normal UI elements.
- Fix: [#8015] RCT2 files are not found when put into the OpenRCT2 folder.
- Fix: [#8957] Error title missing when building with insufficient funds
- Fix: [#10186] Placing multiple saved rides ignores design name (original bug).
- Fix: [#12368] Desync due to ghost station pieces affecting changing ride settings.
- Fix: [#12940] Windows cause issues with snow drawing.
- Fix: [#13019] Simulated trains sometimes open construction window when they crash.
- Fix: [#13021] Mowed grass and weeds don't show up in extra zoom levels.
- Fix: [#13024] Console cursor does not correctly render at current cursor position.
- Fix: [#13029] Not all Junior Roller Coaster pieces are shown when "Show all track pieces" cheat is enabled.
- Fix: [#13044] Rides in RCT1 saves all have "0 customers per hour".
- Fix: [#13074] Entrance and exit ghosts for mazes not being removed.
- Fix: [#13083] Dialog for renaming conflicting track design crops text out.
- Fix: [#13097] Missing direction arrow for stations
- Fix: [#13098] UI buttons for entrance and exit don't toggle according to them being built.
- Fix: [#13098] Maze can still be constructed while placing entrance and exit (original bug).
- Fix: [#13118] Closing construction window resets ride viewport.
- Fix: [#13129] Missing error message when waiting for train to leave station on the ride measurements graph.
- Fix: [#13138] Fix logical sorting of list windows.
- Fix: [#13158] Cursors are drawn incorrectly in text input fields.
- Fix: [#13222] Vehicle collision causes negative number of passengers (original bug).
- Fix: [#13226, #7280] No error is shown when attempting to load a corrupted save.
- Fix: [#13266] Plugin API: Deleting key of sharedStorage not working.
- Fix: [#13278] Desync caused by ghost tiles changing the ride mode.
- Fix: [#13289] Litter and vomit sometimes not loading with RCT1 saved game or scenario
- Fix: [#13292] Impossible excitement rating requirements with finish building 5 coasters goal
- Improved: [#13023] Made add_news_item console command last argument, assoc, optional.
- Improved: [#13098] Improvements to the maze construction window user interface
- Improved: [#13125] Selecting the RCT2 files now uses localised dialogs.
2021-03-13 12:17:05 +01:00
Michał Janiszewski 67b61478cf Reduce inclusion of EntityList.h 2021-02-25 10:56:27 +01:00
Michał Janiszewski 8ee49ab615 Reduce inclusion of world/Sprite.h 2021-02-25 10:56:27 +01:00
Michael Steenbeek 0cdbc99984
Merge pull request #13848 from IntelOrca/refactor/shortcut-engine
Introduce new shortcut engine
2021-02-21 14:01:39 +01:00
Ted John e28c23f10f
Fix regression in CreateSocket (#14131) 2021-02-21 03:58:34 +00:00
Ted John 2b3aabb8e4 Remove old shortcut code and fix issues 2021-02-21 03:14:18 +00:00
Michael Steenbeek 2379c7c9a6
Bump network version 2021-02-19 09:36:45 +01:00
Ted John 3f5698b1e0 Fix REPL write line on Linux 2021-02-16 20:24:51 +00:00
Ted John 05cb106ee7 Improve advertise messages 2021-02-16 20:24:50 +00:00
Ted John c30e1f083b Improve network console messages 2021-02-16 20:24:50 +00:00
Ted John fe70cf26a7
Fix #13933: Clients do not run server plugins 2021-02-05 23:27:15 +01:00
Duncan 2d6da7551b
Fix #13958: Queue corruption due to intersecting entrances
There was a whole host of bugs that this issue has exposed which were caused by intersecting the queue of a ride with an entrance/exit or shop. When this was done the peep would be removed from the queue incorrectly and could end up at the wrong station or a variety of other unexpected behaviour
2021-01-30 17:20:01 +01:00
Michael Steenbeek d3a4c16270
Reserve room for tile owner 2021-01-29 16:56:33 +01:00
ζeh Matt 109a06663d
Fix entrance or exit stacked on top considered a duplicate 2021-01-29 16:19:07 +01:00
Duncan eb52391b9a
Remove next_in_quadrant (#13754)
* Use std::vector of quadrants

* Prevent ptr invalidation issues

* Remove next_in_quadrant

* Make review changes

* Rebuild next_in_quadrant for S6Export

* Fix formatting

* Constexpr where possible

* Increment network version and update replays
2021-01-23 07:36:46 +00:00
Michael Steenbeek 20f959c833
Use track_type_t in more places 2021-01-22 11:33:55 +01:00
Duncan f80531070b
Implement EntityLists (#13853)
* Implement EntityLists

* Remove dead code

* Use alternative name for iterator

* Add comments

* Increment network version

* Update replays

* Remove further dead code

* Update replays again
2021-01-21 18:36:34 +00:00
Duncan 3321720d4a
Split up misc list access to be type specific (#13870)
* Split up misc list access to be type specific

Took the opertunity to use a fold expression to simplify the code

* Increment network version
2021-01-21 08:29:02 +00:00
skdltmxn 7ef4d7762f
Refactor to avoid unnecessary copies (#13736)
* Refactor to avoid unnecessary copies

* Fix dangling references
2021-01-11 18:14:15 -03:00
Michael Steenbeek 60d1e94046
Close #7059: Implement landscape doors on Ghost Train (#13636)
* Implement landscape door updating

* Implement door drawing for Ghost Train

* Amend changelog and bump network version

* Apply review requests

* Always return default seat rotation for ride types with landscape doors

* Fix comment

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-01-10 21:38:02 +00:00
Mathias Gibbens b1e5a11bf3
Several more spelling fixes (#13752)
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>

Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
2021-01-10 18:23:35 +00:00
Duncan d5ada2dca1
Remove type from SpriteBase (#13735)
* Move type field into sub structures

* Use type for misc_type

* Use type for l_type

* Rename to SubType

* Rename SpriteGeneric to MiscEntity

* Rename generic to misc

* Add extra nullptr checks for compilers that cant understand

* Make review changes

* Increment network version

* Update replays
2021-01-10 15:14:34 +00:00
Michael Steenbeek 1da6ae6b51
Merge pull request #13710 from skdltmxn/refactor/string_view
Refactor/string view
2021-01-10 13:37:01 +01:00
skdltmxn b0a8ebc808
Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Gymnasiast cd270df349
Bump network version 2021-01-06 21:25:49 +01:00
skdltmxn c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Matt c442ef6207
Improve performance of tweening entities between ticks 2021-01-05 00:26:58 +02:00
Tulio Leao b7f70ab20b Close #13628: Refactor MASTER_SERVER_STATUS to strong enum 2020-12-23 20:07:53 -03:00
Mike Jones 4e991beb8d
Closes #12419: Merge MISC_COMMAND and GAME_COMMAND into strong enum (#13103)
Merge MISC_COMMAND and GAME_COMMAND enums

Cleanup
2020-12-22 20:53:37 -03:00
Duncan 7440d7eb2b
Fix #13567: Added ability for peeps to stop eating certain food constanly (#13592)
* Fix #13567: Cure guests of severe gluttony

Incorrect assumption that bitscanforward itertated over 64 bits meant that food that was previously within the ExtraItemFlags would never get removed from the peeps inventory. bitscanforward function has been replaced with a 64bit version

* Bump network version
2020-12-17 17:45:40 +00:00
Adam f09b14ef2b
Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Adam 1b61b4b104
Fix #13489: Mechanics continue heading to inspect broken down rides (#13490)
* Fix #13489: Mechanics continue heading to inspect broken down rides
2020-12-05 15:05:55 -03:00
Ted John 9fda9b741c
Fix #13517: Bad formatting of chat messages (#13521)
* Bump network version which was the main cause of the problem.
* Ensure each chat line starts with some format codes.
2020-12-05 13:23:21 +00:00
Ted John b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Ted John 1e5d998338 Remove more instances of format codes 2020-11-27 18:54:56 +00:00
Michael Steenbeek b595370648
Fix #13257: Rides w/ exactly the minimum objective length not counted (#13446) 2020-11-23 19:22:16 -03:00
Michael Steenbeek 23871de19f
Remove built-in explode guests cheat 2020-11-16 22:07:52 +01:00
adam-bloom d79308ef40
Fix #12895: Prevent Mechanics from fixing just fixed rides (#13389)
* Fix #12895: only update ride mechanic status when advancing state

* add changelog message

* Change changelog wording

* Bump network version

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-13 20:13:13 -03:00
Tulio Leao b8f56fd980
Merge pull request #13312 from Gymnasiast/refactor/ride-id-it
Use ride_id_t in more places
2020-11-07 13:03:29 -03:00
Gymnasiast 7ef8082185
Bump network version 2020-11-07 13:49:15 +01:00
Hielke Morsink f0c1ea1d37
Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Michael Steenbeek 3c1aaa97d7
Merge pull request #13379 from Gymnasiast/json-id-in-repo
Allow object lookup using new JSON id
2020-11-06 14:48:56 +01:00
Gymnasiast bafafa6805
Create functions to load objects by JSON id 2020-11-05 21:24:43 +01:00
Richard Fine 438b197b80
Debunch peeps (#12917)
* Stop guests from being forced to the center line of a path over time

Change the way we apply randomness to peep destinations when moving from one tile to the next, to allow peeps that are moving along a straight path to maintain their perpendicular offset relative to the path direction, instead of being (eventually) forced back to the center line.

* Update test expectations

The changes to guest movement mean that the number of steps taken for these expected paths are now slightly different to before.
2020-11-03 22:30:36 -03:00
Sadret c2d309af38
Close #13346: Change FootpathScenery to FootpathAddition (#13350) 2020-11-03 08:17:29 +00:00
Aaron van Geffen cea5fab238 Release v0.3.2
- Feature: [#12110] Add Hybrid Coaster (Rocky Mountain Construction I-Box) track type.
- Feature: [#12999] .sea (RCT Classic) scenarios are now listed in the “New Scenario” dialog.
- Feature: [#13000] objective_options command for console.
- Feature: [#13096] Add Esperanto translation.
- Feature: [#13164] Add 'Objective options' to Cheats menu.
- Change: [#9568] Change lift sounds of Reverser Roller Coaster and Compact Inverted Coaster to better fitting ones.
- Change: [#13160] The lay-out of the Park Cheats tab has been improved.
- Fix: [#1324] Last track piece map selection still visible when placing ride entrance or exit (original bug).
- Fix: [#3200] Close Construction window upon selecting vehicle page.
- Fix: [#4022] Fix Mac cursor offset on launch
- Fix: [#4041] Garbled park option on scenario editor with custom theme.
- Fix: [#4865] Offer an option to disable inhibiting the monitor power.
- Fix: [#5178] Lighting effects cannot be disabled in software mode
- Fix: [#5904] Empty errors on tile inspector base height change.
- Fix: [#6086] Cannot install existing track design with another name.
- Fix: [#6614, #8623] Colours are distorted when using OpenGL with Intel integrated graphics drivers.
- Fix: [#7443] Construction arrows pulse at irregular intervals.
- Fix: [#7518] Water isn't cut down by view clipping tool.
- Fix: [#7748] Tooltips would not timeout for normal UI elements.
- Fix: [#8015] RCT2 files are not found when put into the OpenRCT2 folder.
- Fix: [#8957] Error title missing when building with insufficient funds
- Fix: [#10186] Placing multiple saved rides ignores design name (original bug).
- Fix: [#12368] Desync due to ghost station pieces affecting changing ride settings.
- Fix: [#12940] Windows cause issues with snow drawing.
- Fix: [#13019] Simulated trains sometimes open construction window when they crash.
- Fix: [#13021] Mowed grass and weeds don't show up in extra zoom levels.
- Fix: [#13024] Console cursor does not correctly render at current cursor position.
- Fix: [#13029] Not all Junior Roller Coaster pieces are shown when "Show all track pieces" cheat is enabled.
- Fix: [#13044] Rides in RCT1 saves all have "0 customers per hour".
- Fix: [#13074] Entrance and exit ghosts for mazes not being removed.
- Fix: [#13083] Dialog for renaming conflicting track design crops text out.
- Fix: [#13097] Missing direction arrow for stations
- Fix: [#13098] UI buttons for entrance and exit don't toggle according to them being built.
- Fix: [#13098] Maze can still be constructed while placing entrance and exit (original bug).
- Fix: [#13118] Closing construction window resets ride viewport.
- Fix: [#13129] Missing error message when waiting for train to leave station on the ride measurements graph.
- Fix: [#13138] Fix logical sorting of list windows.
- Fix: [#13158] Cursors are drawn incorrectly in text input fields.
- Fix: [#13222] Vehicle collision causes negative number of passengers (original bug).
- Fix: [#13226, #7280] No error is shown when attempting to load a corrupted save.
- Fix: [#13266] Plugin API: Deleting key of sharedStorage not working.
- Fix: [#13278] Desync caused by ghost tiles changing the ride mode.
- Fix: [#13289] Litter and vomit sometimes not loading with RCT1 saved game or scenario
- Fix: [#13292] Impossible excitement rating requirements with finish building 5 coasters goal
- Improved: [#13023] Made add_news_item console command last argument, assoc, optional.
- Improved: [#13098] Improvements to the maze construction window user interface
- Improved: [#13125] Selecting the RCT2 files now uses localised dialogs.
2020-11-01 20:00:01 +01:00
Gymnasiast 140e945a7b
Increase network version 2020-10-26 23:13:49 +01:00
Haven Kim ce2f78bd51
Fix #13222 : Vehicle collision causes negative number of passengers
When peep_sprite_remove is called, RemoveFromRide() will decrease ride's num_riders
2020-10-19 23:33:54 +02:00
ζeh Matt 645289f4ec
Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
X123M3-256 9681ea4cea
Add "Hybrid Coaster" ride type (#12110)
* Add "Hybrid coaster" ride type

* Add turns

* Add diagonal slopes

* Add bank transitions

* Add diagonal bank transitions

* Add banked turns

* Add sloped turns

* Add sloped bank transitions

* Add sloped banked turns

* Add s bends

* Add helices

* Add barrel rolls

* Add half loops

* Start changing supports to wooden

* Switch diagonals and banked turns to wooden supports

* Finish switching supports to wooden

* Alter default supports for small turns and steep turns

* Split track sprites that were glitching

* Fix incorrect sprite indices on small helices

* Add supports for large flat to steep pieces

* Fix bug with b supports

* Add supports for quarter loops

* Finalize set of track elements

* Fix strange colors when track piece is highlighted

* Update sprites.json

* Add support for corkscrews

* Fix incorrect remap colors and default supports

* Add slope to banked turn transitions

* Add support for preview image in color selection window

* Fix static glitches

* Correct Z offset

* Set segment heights (and fix more static glitches)

* Improve sloped curve supports

* Fix slope to banked turn transitions

* Fix dynamic glitches

* Fix boosters

* Remove corkscrews

* Set ride data and implement ride rating function

* Fix glitches on steep turns and gentle to steep

* Format code

* Add sprites

* Add track color preview image

* Fix formatting

* Add files to MSVC project

* Fix Testpaint

* Revert removal of RIDE_TYPE_50 from GetClassification

* Introduce constant instead of hard coded number

* Fix stray change

* Improve legibility of ride_ratings_calculate_hybrid_coaster()

* Fix comments on byte_97B23C

* Fix two other stray changes

* Fix Xcode project

* Adjust bounding boxes to make clipping behaviour more consistent

* Fix two glitches on medium and large turns

* Address comments from DuncansPumpkin

* Fix incorrect ride ID

* Fix steep turn sprites

* Run PNG images through OptiPNG

* Update changelog

* Fix namespace error

* Use arrays for supports to handle additional elements

* Rename functions to TitleCase and add namespace

* Increment network version

Co-authored-by: Edward Calver <hx010973@reading.ac.uk>
Co-authored-by: tylerleamon <59478575+tylerleamon@users.noreply.github.com>
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-10-10 20:27:12 +01:00
Vinicius Sa c6b7893d77
Verify pointer against nullptr before using it
Reported by PVS-Studio (Warning: V1004).

Fix 6/7.

Issue: 12523
2020-10-06 18:21:26 -03:00
Aaron van Geffen 797fe48b0f
Merge pull request #13068 from mwnciau/json-compilation-performance
Fix #13055: Replace includes of Json.hpp in header files with json_fwd.hpp
2020-10-06 01:09:41 +02:00
Simon Jarrett 134371f03c Change includes of nlohmann/json_fwd.hpp to new core/JsonFwd.hpp 2020-10-06 00:16:21 +02:00
Julia Pinheiro 6a76547c5b
Close #12412: Refactor PROMPT_MODE to use strong enum (#13076) 2020-10-02 23:04:59 -03:00
Simon Jarrett 9c5e9f8dbc Replace includes of Json.hpp in header files with json_fwd.hpp 2020-10-02 11:31:20 +01:00
Julia Pinheiro c36ec5c5ce
Close #12425: Refactor SOCKET_STATUS to use strong enum (#13064) 2020-10-01 22:10:51 -03:00
Julia Pinheiro 657106d4c6
Close #12424: Refactor NetworkStatisticsGroup to use strong enum (#13056) 2020-10-01 22:07:48 -03:00
Tulio Leao d01dcea98a Release v0.3.1
- Feature: [#10807] Add 2x and 4x zoom levels (currently limited to OpenGL).
- Feature: [#12703] Add scenario plugin APIs.
- Feature: [#12708] Add plugin-accessible names to all game actions.
- Feature: [#12712] Add TCP / socket plugin APIs.
- Feature: [#12840] Add Park.entranceFee to the plugin API.
- Feature: [#12884] Add BaseTileElement.occupiedQuadrants to the plugin API.
- Feature: [#12885] Add SmallSceneryElement.quadrant to the plugin API.
- Feature: [#12886] Make all scenery placement and remove actions available to the plugin API.
- Feature: [#2350, #12922] Add snow, heavy snow and blizzard to weather types.
- Fix: [#400] Unable to place some saved tracks flush to the ground (original bug).
- Fix: [#5753] Entertainers make themselves happy instead of the guests.
- Fix: [#7037] Unable to save tracks starting with a sloped turn or helix.
- Fix: [#12691] Ride graph tooltip incorrectly used count instead of number string.
- Fix: [#12694] Crash when switching ride types with construction window open.
- Fix: [#12701] Silent NSIS setup flag /S isn't silent, upgrade pop-up appears anyway.
- Fix: [#12737] Space Rings draw the same vehicle 4 times.
- Fix: [#12756] Scenario Editor crashing the game on macOS.
- Fix: [#12764] Rides don't start aged anymore.
- Fix: [#12818] Ride price not ignored in free-rides parks.
- Fix: [#12820] Title menu buttons not invalidating properly
- Fix: [#12845] Deleting ride with active ad campaign creates incorrect notification.
- Fix: [#12857] Incorrect Peep thoughts in imported RCT1 parks.
- Fix: [#12881] Guests' favourite rides are not listed in the guest window.
- Fix: [#12910] Plugin API: getRide sometimes returns null for valid ride IDs.
- Fix: [#12912] Plugin: selectedCell of CustomListView is being ignored on creation.
- Fix: [#12918] Cannot place vanilla TD6 tracks of the Hypercoaster, Monster Trucks, Classic Mini Roller Coaster, Spinning Wild Mouse and Hyper-Twister types.
- Fix: Incomplete loop collision box allowed overlapping track (original bug).
- Improved: [#12806] Add Esperanto diacritics to the sprite font.
- Improved: [#12837] Arabic text is now drawn and shaped correctly on Windows.
- Improved: [#12890] Add stroke to lowercase 'L' to differentiate from capital 'I'.
- Technical: [#12749] The required version of macOS has been lowered to 10.13 (High Sierra).
2020-09-27 17:57:34 -03:00
Duncan da82144bfb
Fix #12944. Mistake from refactor meant formatter optimised away (#12961)
Not sure why it should get optimised away but this will fix the crashes.
2020-09-18 09:25:17 +01:00
Matt b3b9a348c5
Apply review suggestions 2020-09-17 22:16:05 +03:00
Matt ccde06ab0f
Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +03:00
Matt 2639349925
Move storage into Formatter class and refactor usage 2020-09-17 22:14:36 +03:00
Simon Jarrett 1b821c1059 Refactor ServerList to use new JSON library 2020-09-16 20:18:53 +01:00
Simon Jarrett 651a2951a1 Refactor NetworkUser to use new JSON library
- Removed the ToJson(json_t) method
- The FromJson method expects to receive a JSON node of type object (as per added documentation)
- Unlike elsewhere, we need to use iterators for the Save() method to allow us to remove items from the array
2020-09-16 20:18:53 +01:00
Simon Jarrett de9a16404b Refactor NetworkServerAdvertiser to use new JSON library
- the body.dump() calls throughout use the default indent parameter of -1 so will produce JSON with no whitespace
- OnRegistrationReponse must be passed a JSON node of type object
2020-09-16 20:18:53 +01:00
Simon Jarrett c655d47dd3 Refactor NetworkGroup to use new JSON library 2020-09-16 20:18:53 +01:00
Simon Jarrett f1bcf20050 Refactor NetworkBase to use new JSON library 2020-09-16 20:18:52 +01:00
Michael Steenbeek 3acbb92074
Merge pull request #12922 from Gymnasiast/LetItSnow2 2020-09-15 18:11:45 +02:00
Tulio Leao c1729c8a87
Merge pull request #12858 from ju-pinheiro/network-strong-enums
NETWORK_PERMISSION and NETWORK_AUTH replaced by strong enums
2020-09-15 08:07:19 -03:00
Gymnasiast a46a21973f
Amend changelog; bump network version 2020-09-14 22:00:54 +02:00
ju-pinheiro 214620951f Close #12421: Refactor NETWORK_AUTH to use strong enum
Replacing enum NETWORK_AUTH with enum class NetworkAuth.
2020-09-10 19:32:28 -03:00
ju-pinheiro 20a8bbc322 Close #12420: Refactor NETWORK_PERMISSION to use strong enum
First approach, instead of a bigger refactor to avoid the need of "static_cast".
2020-09-10 19:32:27 -03:00
Tulio Leao cf5f3da0df
Cleanup c-style casts from Socket.cpp 2020-09-10 21:36:21 +02:00
Michael Steenbeek bd28b74655
Make all game actions take an ObjectEntryIndex where applicable (#12384)
* Make all game actions take an ObjectEntryIndex where applicable

* Update replays for parameter size change

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-09 17:03:20 +01:00
Richard Fine d2d9750a5b Fix #5753: Entertainers make themselves happy instead of the guests
After identifying guests that are near an entertainer, modify the guest's HappinessTarget and TimeInQueue values instead of the entertainer's own values.
2020-09-08 16:40:29 -04:00
chess123mate 83de5fab2a
Fix #12818 - Ride prices not ignored in free-rides parks (#12832) 2020-09-05 11:10:42 -03:00
Ted John 33ba51b763 Fix crashes and improve socket lifecycle 2020-09-03 22:38:42 +01:00
Ted John fd6fddb61a Improve WSA handling 2020-09-03 22:38:42 +01:00
Ted John 182bcaf21a Implement setNoDelay 2020-09-03 22:38:42 +01:00
Ted John dce547af99 Start implementing TCP API 2020-09-03 22:38:35 +01:00
Nils Caspar 359bbee9f5
Fix #12845: Cancel marketing campaigns for demolished rides (#12848) 2020-09-03 18:20:42 -03:00
Julia Pinheiro dafde532af
Close #12426: Refactor NETWORK_READPACKET to use strong enum (#12807)
Replacing enum NETWORK_READPACKET with enum class NetworkReadPacket.
2020-08-31 09:13:15 -03:00
ju-pinheiro e9c3f31422
Close #12423: Refactor NETWORK_SERVER_STATE to use strong enum (#12802)
#12423
2020-08-29 08:05:51 -03:00
Tulio Leao 10aca0fe6e Fix #12764: Rides don't start aged anymore 2020-08-25 08:21:34 -03:00
frutiemax 4165d64e60
Part of #11159: save_for_network returns unique_ptr (#12163) 2020-08-22 18:56:34 -03:00
Simon Jarrett 9fb51c18d4 Fix: Incomplete loop collision box allowed overlap (original bug) 2020-08-18 17:03:35 +01:00
Aaron van Geffen 135cc10b47 Release v0.3.0 2020-08-15 21:13:50 +02:00
ζeh Matt c1076658fc
Merge pull request #12658 from ZehMatt/fix-network-hang
Fix freezes on incomplete packet transmission
2020-08-12 19:00:27 +02:00
Matt 08af1e9be6 Increase network buffer to maximum packet size of 64 KiB 2020-08-12 18:36:12 +02:00
Michael Steenbeek d1b193c06d
Fix #11968: Maze height is higher than it should be 2020-08-12 18:33:15 +02:00
Matt ebc2be4cd0 Fix freezes on incomplete packet transmission 2020-08-12 18:11:09 +02:00
Matt 2a9796f2cc Add more guards in network code 2020-08-11 15:56:09 +02:00
ζeh Matt cb38d28b62
Fix #12621: Missing argument for localisation 2020-08-10 14:58:39 +02:00
Matt c16bdb5c69 Fix #11085: Handle player list before game actions during map load 2020-08-08 20:47:34 +02:00
ζeh Matt 765eada18e
Merge pull request #12526 from ZehMatt/win32-cleanup
Win32 and namespace cleanup
2020-08-05 17:18:50 +02:00
Duncan 3533d1734f
Merge pull request #12571 from ZehMatt/network/update-2
Refactor more network code
2020-08-05 15:55:24 +01:00
Matt 0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt 83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Matt 30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Matt e91e68e3ec Re-phrase the network compatibility comment 2020-08-05 16:19:57 +02:00
Tulio Leao 78053e34d5
Fix #12561: Synchronized coasters not synced (#12572) 2020-08-04 15:51:35 +01:00
Matt 07b343813a Fix passing missing parameter 2020-08-03 00:46:44 +02:00
Matt 28dcaeae2f Refactor reading/writing packets 2020-08-03 00:36:02 +02:00
Matt 21f63c1010 Pass NetworkCommand type as constructor to simplify code 2020-08-02 22:31:00 +02:00
Matt 313b8a7518 Remove std::unique_ptr and use move semantics instead 2020-08-02 22:08:56 +02:00
Matt 224efdbbdf Simplify usage of NetworkPacket::Data 2020-08-02 22:07:47 +02:00
Duncan f49bfa777a
Change maze pathfinding to not prefer a direction (#12546)
* Change maze pathfinding to not prefer a direction

* Increment network version

* Update changelog

* Update replays
2020-08-02 08:20:34 +01:00
Michael Steenbeek e0f2aa9b99
Fix: Brakes keep working during "Brakes failure"
This was an error in the original implementation back in 2015.
Thanks to @duncanspumpkin for checking the assembly.
2020-07-30 22:21:19 +02:00
Matt f258c8034d Wrap code with macro test DISABLE_NETWORK 2020-07-30 20:29:16 +02:00
Matt af757fa58e Categorize members of NetworkBase 2020-07-30 20:29:15 +02:00
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
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