* 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
The sprite_remove in Sprite.cpp tries to find itself inside the quadrant.
It does not find itself, and because the rest of the code assumes that it will always find it
The normal code tries to set the value of the next_in_quadrant so that whoever points at it, will now point at its next sprite.
But because it didn't find whoever was pointing to it, it would set the pointer to SPRITE_INDEX_NULL to its next sprite.
This would lead to cycles in the linked list
The reason that the sprite was not found is that during the entry of a ride, the position of a peep is set to LOCATION_NULL
Exiting a ride sets it back to whatever the location is of an exit.
However stopping a ride that still has people in it would go wrong, as the people are removed from the ride through ride_remove_peeps
This function was called during the PaintWindows.
The fact that this function is called during the painting is the problem, because of the tweening:
Before painting all the positions are stored (Which would at that point be the LOCATION_NULL), during the painting
the peep would be removed from the ride, setting their location to the enrance/exit
After painting is done all the positions are restored again, so the patched position is forgotten and then it would be
removing a sprite with location LOCATION_NULL and that goes wrong
The fix is to have the window update outside of paint
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
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).
Fixes#7313: Loading an invalid path with openrct2 produces results different than expected
Do not load title sequences in headless mode and prevent use of null audio mixer when ride music is stopped.