1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

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.
This commit is contained in:
Hielke Morsink
2019-10-16 21:51:59 +02:00
committed by GitHub
parent acab73ae6a
commit 8c1ccfdaa9
2 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@
// This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "18"
#define NETWORK_STREAM_VERSION "19"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static Peep* _pickup_peep = nullptr;