summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-12-28 22:29:59 +0000
committerpeter1138 <peter1138@openttd.org>2005-12-28 22:29:59 +0000
commit901068fd6e2b2c7059a59b5ec97c92e1ffe0633c (patch)
tree36bb1703510989fc2a6344323a6e775738b29355 /aircraft_cmd.c
parent139d1ed1ebc26ceeb1bb68af27d5d1644c5a988a (diff)
downloadopenttd-901068fd6e2b2c7059a59b5ec97c92e1ffe0633c.tar.xz
(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.
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c4
1 files changed, 4 insertions, 0 deletions
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);
}