summaryrefslogtreecommitdiff
path: root/ship_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-07 18:13:49 +0000
committertron <tron@openttd.org>2005-06-07 18:13:49 +0000
commitd2364f1d51ed868d6c9f0336c57dde46aef5fc3c (patch)
tree918dadd86e83f26d5de3c32831397bc35434bfa7 /ship_cmd.c
parentf723540fbb69d32f1ca9d5487657f39e69efc239 (diff)
downloadopenttd-d2364f1d51ed868d6c9f0336c57dde46aef5fc3c.tar.xz
(svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[]
Diffstat (limited to 'ship_cmd.c')
-rw-r--r--ship_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ship_cmd.c b/ship_cmd.c
index 62ec43c38..a1c64a3af 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -912,7 +912,7 @@ int32 CmdBuildShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v->max_speed = svi->max_speed;
v->engine_type = (byte)p1;
- e = &_engines[p1];
+ e = GetEngine(p1);
v->reliability = e->reliability;
v->reliability_spd_dec = e->reliability_spd_dec;
v->max_age = e->lifelength * 366;