summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-12-13 18:25:42 +0000
committerfrosch <frosch@openttd.org>2008-12-13 18:25:42 +0000
commitc1d1ba22cc22e5b0527840d8aca4e70703261d62 (patch)
tree0890693cd16487b25fae0ddc78f9d2f07a83bc94 /src/aircraft_cmd.cpp
parenta5b33d1f3bf8db9984f4a55ad86c546079509847 (diff)
downloadopenttd-c1d1ba22cc22e5b0527840d8aca4e70703261d62.tar.xz
(svn r14672) -Fix [FS#2444]: Property 7 and callback 12 were broken for aircraft.
Now callback 12 is properly called also for 'mail'. If the callback is not used, 'mail' uses 1/4 of property 7 (rounded up).
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index ae7939195..85d96b42c 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -342,6 +342,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
v->max_speed = avi->max_speed;
v->acceleration = avi->acceleration;
v->engine_type = p1;
+ u->engine_type = p1;
v->subtype = (avi->subtype & AIR_CTOL ? AIR_AIRCRAFT : AIR_HELICOPTER);
v->UpdateDeltaXY(INVALID_DIR);
@@ -427,6 +428,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
Vehicle *w = vl[2];
w = new (w) Aircraft();
+ w->engine_type = p1;
w->direction = DIR_N;
w->owner = _current_company;
w->x_pos = v->x_pos;