Commit Graph

12843 Commits

Author SHA1 Message Date
duncanspumpkin 3ac596faf1 Implement ScenarioSetSetting game action
Further work moving game commands into the game action framework to improve design.
2019-05-14 21:46:27 +01:00
Michael Steenbeek c9cbe391eb
Merge pull request #8427 from Mikroscopic/minimap-fix
Fix #8385: Ghost objects rendered in minimap
2019-05-14 22:38:26 +02:00
Michael Steenbeek abc13422ed
Fix #9132: System file browser cannot open SV4 files 2019-05-14 22:12:23 +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
joshtucker132 4dc77bf121 Feature #8791: Improved tile element flag manipulation in Tile Inspector 2019-05-14 21:38:31 +02:00
Gymnasiast 5e39640837 Also remove game_command_set_park_entrance_fee from new_game_command_table 2019-05-14 18:39:14 +02:00
Gymnasiast 4e23c42d38 Remove stub functions from new_game_command_table[] 2019-05-13 22:51:41 +02:00
Gymnasiast 8d9645a382 Remove comment 2019-05-13 22:22:14 +02:00
Gymnasiast 170307cd0f Remove redundant semicolons after for loops 2019-05-13 22:16:30 +02:00
Gymnasiast 2ea1fcc69d Remove unused declarations and functions 2019-05-13 22:16:14 +02:00
ζeh Matt 0ff19f071f Fix #9240: crash when passing directory instead of save file 2019-05-13 21:34:58 +02:00
duncanspumpkin 4de6071fb4 Increment network version 2019-05-12 19:03:03 +01:00
duncanspumpkin b9a70d02a3 Make suggested changes
Implement suggestions

Fix formatting
2019-05-12 17:31:48 +01:00
duncanspumpkin e9e445837f Add landset/buyrights action 2019-05-12 17:29:19 +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 c6ea47c631
Make util_rand thread safe 2019-05-12 11:32:33 +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 1ac8d9058f Colour local servers as green 2019-05-12 01:05:11 +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 f8e3abcf4e Remove by-reference string_view 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 6aa0e74d3e
Fix util_rand only returning 15 bit values. 2019-05-11 22:37:19 +02:00
Matt 9561567b6c
Bump up network version 2019-05-11 21:39:01 +02:00
Matt 7c7909fb45
Fix #2294: Clients crashing the server with invalid object selection 2019-05-11 21:39:01 +02:00
ζeh Matt c8f822ea70
Gamestate snapshots (#8819)
* Add initial interface.

* Implement move operator in MemoryStream

* Add pod array serialisation traits.

* Add push_back with move semantics to CircularBuffer

* Initial implementation of GameStateSnapshots

* Add GameStateSnapshots to Context.

* Add mp_desync console command.

* Compare sprite data and fill change list.

* Minor changes.

* Proof of concept.

* Calculate offset instead of using offsetof

* Implement game state difference detection

* Update mp_desync console command.

* Fix identification of sprite remove/add.

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

* Output state differences into user directory desync folder.

* Add desync debugging as an option.

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

* Cast to proper type for %llu.

* Update xcode project

* Add more information to the diffed data.

* Remove client-only relevant fields.

* Cleanup.

* Add better name output for misc sprites

* Add srand0 and tick information to the output

* Bump up network version

* Cleanup

* Set desync_debugging to false as default

* Apply suggestions
2019-05-11 21:31:34 +02:00
ζeh Matt 1f6c7c9942 Fix false positive desync when changing map during network play 2019-05-11 18:27:09 +02:00
Ted John 7074d6f3ae Apply review suggestions 2019-05-11 13:57:18 +01:00
Tom Lankhorst ed353faccf Implement replace_if condition lambda
Fix include typo and CS
2019-05-11 13:54:16 +01:00
Tom Lankhorst 744f2225ed Write platform tests 2019-05-11 13:54:16 +01:00
Tom Lankhorst bbd69496b4 Sanitize screenshot path 2019-05-11 13:54:16 +01:00
nexgenration ebefe5721b Fix #9198: Move vehicle invalidate to member function
To further improve the readability of the codebase the vehicle_invalidate function is now a member function of rct_vehicle.
2019-05-11 13:20:34 +01:00
Hielke Morsink b51f6a4d90 Use case-insensitive compare for soring ride and vehicle types (#9229) 2019-05-11 12:06:29 +01:00
Filip Gawin 6833da77e3 Simplify boolean expresions 2019-05-10 22:00:38 +02:00
Michał Janiszewski 7b71fe8acd Fix error value checked from ride_get_smallest_station_length (#8719)
ride_get_smallest_station_length returns the int32_t::max instead of -1
on error.
2019-05-08 22:34:41 +01:00
Ted John 710da039a4 Show ghost elements as white on mini-map
Also fixes refresh of map when using OpenGL drawing engine
2019-05-08 21:37:33 +01:00
Mikroscopic 80a9cf8670 Fix ghost objects rendering on minimap 2019-05-08 21:36:31 +01:00
Michael Steenbeek da6794ad9e
Refactor second argument to move_sprite_to_list() 2019-05-08 22:11:51 +02:00
Gymnasiast 7f5c9622c0 Fix guests eating popcorn being drawn eating pizza 2019-05-08 20:57:20 +02:00
Gymnasiast 17ddd451db Fix tests, fix formatting 2019-05-07 20:04:07 +02:00
Gymnasiast 916b8c2705 Use more constants 2019-05-07 19:46:58 +02:00
Gymnasiast 212f425ff0 Rename variables, change signature 2019-05-07 19:34:50 +02:00
NexGenration 846011e21b another message here 2019-05-07 19:34:50 +02:00
NexGenration e6c88a05db Make peep generate a static member function 2019-05-07 19:34:50 +02:00
Ted John 0d0479f9b1
Merge pull request #8558 from richard-fine/feature/peep-inspector
Peep debug tab
2019-05-06 20:29:29 +01:00
Gymnasiast 2368fea91e Bump network version 2019-05-06 19:15:32 +02:00
Ted John a22f0a53fb Use localised strings for guest debug tab 2019-05-04 21:48:02 +00:00
Ted John f50695fc9b Refactor guest window resize 2019-05-04 16:23:29 +00:00
Ted John a90a86562d Refactor guest widget lists 2019-05-04 15:01:51 +00:00
Ted John 7c2708746e Re-draw debug tab every tick 2019-05-04 14:53:25 +00:00
Ted John c13bd04954 Refactor invalidate methods 2019-05-04 14:40:45 +00:00
Ted John 1d296242b4 Improve text colour 2019-05-04 14:09:15 +00:00
Ted John b4a2a94520 Fix build 2019-05-04 14:08:37 +00:00
Richard Fine 480f19c0c6 Add parens to fix operator precedence issue
I missed one... thankfully the CI did not.
2019-05-04 14:08:37 +00:00
Richard Fine 9bb68a7151 Pull window width into temporary variable
As suggested in review, it's a little easier to read this way.
2019-05-04 14:08:37 +00:00
Richard Fine b714f7b0e2 Use constexpr instead of const
For a static constant integer value, it's stylistically clearer to use constexpr instead of const. The resulting variable is implicitly const, but is also guaranteed to have a compile-time-computable value.
2019-05-04 14:08:37 +00:00
Richard Fine 97bcc53637 Eliminate itoa and use correct format specifiers
Use snprintf instead of _itoa as it's not available on all platforms. Also change the format specifies for unsigned variables to %u instead of %i, to be more correct...
2019-05-04 14:08:37 +00:00
Richard Fine 397b044588 Use safe_strcat instead of strcat_s
strcat_s is not available on all platforms, and we have a utility in the codebase that does basically the same thing already.
2019-05-04 14:08:37 +00:00
Richard Fine cfda3fb8f7 Use sizeof(buffer) instead of hardcoded size
Use sizeof(buffer) instead of repeating 4096 in a bunch of places. Also, 4096 was maybe a bit overkill, drop it down to 512 instead.
2019-05-04 14:08:37 +00:00
Richard Fine 8bf72ceadb More peep pathing info
Show more peep debug data in the Guest debug tab, mostly to help with understanding pathfinding behaviour.
2019-05-04 14:08:37 +00:00
Richard Fine 7300a38ce6 Show peep coordinates in debug tab
As a first debug stat to show, display a peep's current coordinates in the debug tab
2019-05-04 14:08:37 +00:00
Richard Fine 70c61d5ac6 Fix guest window width for debugging tab
Introduce a named constant for the width of a tab in the Guest window, and touch the places that set the window width to add it to the minimum window width when the debugging tab is enabled, so that the tab doesn't render off the side of the window.
2019-05-04 14:08:37 +00:00
Richard Fine 5ef07ab936 Formatting 2019-05-04 14:08:37 +00:00
Richard Fine fa63691d17 Disable guest debug tab when debug tools not turned on
Disable the debug tab in the guest window when the debugging tools are not turned on, causing it to be completely hidden from view.
2019-05-04 14:08:37 +00:00
Richard Fine c4a449f47d Add new debugging tab to the Guest window
Add a new tab to the Guest window which we can use to display debug information and tools for guests. At the moment it's blank and always visible; next step is to make it only show up when debugging tools are enabled.
2019-05-04 14:08:37 +00:00
ζeh Matt cd8c67ddac
Implement SetCheatAction. (#8990)
* Implement SetCheatAction.

* Bump up network version
2019-05-04 15:28:38 +02:00
Ted John e84631c273
Fix #9204: Making screenshots from command-line is broken (#9206) 2019-05-04 13:22:01 +00:00
Hielke Morsink 5e9e7bcbe5 Fix: artifacts when changing ride type as client or using the in-game console (#9202) 2019-05-04 10:31:10 +00:00
Aaron van Geffen 0da35a599d
Merge pull request #9193 from Gymnasiast/optional-header
Add `optional` header
2019-05-03 10:45:50 +02:00
Aaron van Geffen f1b9c71524
Merge pull request #8687 from Xkeeper0/f/multiplayer-plus
Multiplayer dropdown additions
2019-05-02 22:53:50 +02:00
Tom Lankhorst 63a38412aa Add `optional` header 2019-05-02 22:53:19 +02:00