diff options
author | maedhros <maedhros@openttd.org> | 2007-10-21 16:52:01 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-10-21 16:52:01 +0000 |
commit | 5712da734f3707046a1795385fccb2d39250830b (patch) | |
tree | 49b089aceeceb38e9064dba20fad4c3f1d0689aa | |
parent | b4e7203b0a2c287d1cfbdfe9b59b3eeb09c07d4f (diff) | |
download | openttd-5712da734f3707046a1795385fccb2d39250830b.tar.xz |
(svn r11333) -Fix: Train engines still had a value of 0.
-rw-r--r-- | src/train_cmd.cpp | 2 |
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(); |