(svn r3352) - NewGRF: Move initialization of vehicle random_bits to DC_EXEC blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs.

This commit is contained in:
peter1138
2005-12-28 22:29:59 +00:00
parent 139d1ed1eb
commit 901068fd6e
6 changed files with 21 additions and 7 deletions

View File

@@ -265,6 +265,9 @@ int32 CmdBuildAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v->cur_image = u->cur_image = 0xEA0;
v->random_bits = VehicleRandomBits();
u->random_bits = VehicleRandomBits();
VehiclePositionChanged(v);
VehiclePositionChanged(u);
@@ -286,6 +289,7 @@ int32 CmdBuildAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2)
w->vehstatus = VS_HIDDEN | VS_UNCLICKABLE;
w->subtype = 6;
w->cur_image = SPR_ROTOR_STOPPED;
w->random_bits = VehicleRandomBits();
VehiclePositionChanged(w);
}