summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-10-21 16:52:01 +0000
committermaedhros <maedhros@openttd.org>2007-10-21 16:52:01 +0000
commit68a1fbd4372103b004d443b000ee1c27c64ca05b (patch)
tree49b089aceeceb38e9064dba20fad4c3f1d0689aa
parent4bb210614bd00b7a422fa4faec7974da6375a82c (diff)
downloadopenttd-68a1fbd4372103b004d443b000ee1c27c64ca05b.tar.xz
(svn r11333) -Fix: Train engines still had a value of 0.
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index fd6aee27b..715472f2f 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -704,6 +704,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
int x = TileX(tile) * TILE_SIZE + _vehicle_initial_x_fract[dir];
int y = TileY(tile) * TILE_SIZE + _vehicle_initial_y_fract[dir];
+ v = new (v) Train();
v->unitnumber = unit_num;
v->direction = DiagDirToDir(dir);
v->tile = tile;
@@ -736,7 +737,6 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
v->service_interval = _patches.servint_trains;
v->date_of_last_service = _date;
v->build_year = _cur_year;
- v = new (v) Train();
v->cur_image = 0xAC2;
v->random_bits = VehicleRandomBits();