You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Desync occurs shortly after vehicle details are shown in the purchasing GUI when a refit would occur on purchase.
It is not necessary to actually click the "Buy and refit" button for the desync to occur, however doing so would also trigger the desync.
The current implementation of CmdBuildVehicle when in test mode (i.e. without DC_EXEC), purchases the vehicle with DC_EXEC and immediately sells it again with DC_EXEC.
This is not MP-safe as vehicle purchase and sale are not side-effect free operations.
In particular VehicleRandomBits() is called which will update the random seed, triggering the desync immediately.
NewGRFs callbacks involved in purchasing may also be potentially problematic.
Steps to reproduce
Use of the "build and refit" feature in a multiplayer game.
The text was updated successfully, but these errors were encountered:
PeterN
added a commit
to PeterN/OpenTTD
that referenced
this issue
Apr 4, 2019
Version of OpenTTD
Since d54b6ac
Expected result
Desync does not occur
Actual result
Desync occurs shortly after vehicle details are shown in the purchasing GUI when a refit would occur on purchase.
It is not necessary to actually click the "Buy and refit" button for the desync to occur, however doing so would also trigger the desync.
The current implementation of CmdBuildVehicle when in test mode (i.e. without DC_EXEC), purchases the vehicle with DC_EXEC and immediately sells it again with DC_EXEC.
This is not MP-safe as vehicle purchase and sale are not side-effect free operations.
In particular VehicleRandomBits() is called which will update the random seed, triggering the desync immediately.
NewGRFs callbacks involved in purchasing may also be potentially problematic.
Steps to reproduce
Use of the "build and refit" feature in a multiplayer game.
The text was updated successfully, but these errors were encountered: