1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00
Commit Graph

34 Commits

Author SHA1 Message Date
Matt
c24112ffad Refactor out gCommandExpenditureType 2019-12-22 20:51:49 +01:00
duncanspumpkin
d8b5060eb9 Remove dead game command code.
Refactor of z increment
2019-12-15 08:21:32 +00: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
Matt
3bdc3935dc Use correct update order 2019-08-21 00:28:08 +02:00
Matt
769ed255f3 Refactor game action queue out of network into GameActions 2019-08-21 00:15:39 +02:00
kennycastro007
9708e3a043 Fixed issue #8376 (#9866)
#8376: Added static function show_error in S6Importer.cpp
2019-08-15 16:02:03 +02:00
ζeh Matt
df4e412826 Fix #9762: Update network logic also from title screen (#9773) 2019-08-08 16:49:30 +01:00
Duncan
659b4d8f9f Clean up some litter in the codebase (#9753)
13CA740 and 141F568 have been doing mostly nothing since the game action refacotr. Before that they didn't do much as I've never found any instance where the code was hit.
2019-08-08 06:05:58 +01:00
Matt
01de097ef0 Fix #9666: pause server if no clients are connected 2019-08-06 00:49:37 +02:00
Ted John
d28799ef18 Remove user strings 2019-07-29 20:01:37 +01:00
Ted John
5733d666b3 Do not store park name as a user string 2019-07-21 11:33:15 +02:00
Matt
83511c5c7f Fix clients being behind one tick at all times 2019-05-18 19:56:03 +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
Michael Steenbeek
5a906b2378 Port more functions to Ride struct (#9119) 2019-04-20 22:22:39 +02:00
Aaron van Geffen
f4602d0a34 Use SCREEN_FLAGS_EDITOR when appropriate. 2019-03-20 20:58:08 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
ζeh Matt
a34422dc26 Fix #8591: Game loop does not run at a consistent tick rate of 40 Hz (#8594)
* Fix #8591: Run game loop at consistent tick rate of 40hz.

* Update distribution/changelog.txt

Co-Authored-By: ZehMatt <m.moninger.h@gmail.com>
2019-01-17 23:22:27 +01:00
Matt
a6efef1e81 Add support to record and replay game commands/actions. 2018-12-29 19:23:27 +01:00
Michael Steenbeek
6d0f0334d7 Merge pull request #8339 from ZehMatt/realtime-ticks
Use real time ticks for UI effects.
2018-12-15 21:00:44 +01:00
ζeh Matt
04af3932ac Fix #5684: Refactor player list updates being bound on ticks. (#8399) 2018-12-09 20:39:44 +01:00
Matt
862ef3018c Use gCurrentRealTimeTicks whenever appropriate. 2018-12-01 17:00:11 +01:00
Matt
4bc69a0111 Introduce gCurrentRealTimeTicks and refactor some variable names. 2018-12-01 16:36:00 +01:00
Michał Janiszewski
0d2751a54e Hide the network class declaration to Network.cpp (#8276)
The Network class is not used by anyone other than free functions in
Network.cpp, nor should it be used by anyone with the current design.

This change leaves only the publicly-exposed functions left in the
header, drastically reducing amount of required headers in network.h,
one of the heaviest headers we had so far.
2018-11-19 23:10:54 +01:00
jensj12
eac9b720ee Add #7726: Shortcut to advance one tick (#7851) 2018-09-23 23:40:47 +02:00
Linus Unnebäck
fd07be587a Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
clang-format
c57bbca827 clang-format root 2018-07-23 16:00:14 +02:00
Ted John
f79954bde3 Refactor map element organisation
Committing some changes that were originally for #7637.
- Refactor map_check_free_elements_and_reorganise
- Refactor map_strip_ghost_flag_from_elements
- Remove sub_68B089

I have removed sub_68B089 because this function was run every game tick
and 1000 times when trying to request some spare elements. It was a
lighter function which tried to stretch out the tile element pointers
behind any spare elements. In this day and age, doing a full tile
element defrag is very fast (even in debug mode it takes no more than
10ms), so I don't think keeping sub_68B089 is necessary.
2018-06-20 21:35:27 +01:00
Michael Steenbeek
1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink
0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John
ae6af47341 Move TitleSequencePlayer to libopenrct2ui 2018-06-10 23:39:56 +01:00
Aaron van Geffen
dcff6895b5 Refactor game_init_all into GameState::InitAll. 2018-05-30 11:53:32 +02:00
Ted John
d57867e722 Use the Date class in GameState. 2018-05-30 11:53:32 +02:00
Ted John
f1ee5cad83 Call Park from GameState. 2018-05-30 11:53:32 +02:00
Ted John
4d4e7ba4b1 Create new GameState class for updating the game 2018-05-30 11:53:30 +02:00