From 1ffc70079787954dda1182de89eca25f36837490 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 28 Dec 2005 22:29:59 +0000 Subject: (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. --- aircraft_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'aircraft_cmd.c') diff --git a/aircraft_cmd.c b/aircraft_cmd.c index 4ec0b531f..a6fd64f53 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -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); } -- cgit v1.2.3-70-g09d2