diff options
author | rubidium <rubidium@openttd.org> | 2007-10-21 16:45:00 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-21 16:45:00 +0000 |
commit | 4bb210614bd00b7a422fa4faec7974da6375a82c (patch) | |
tree | cd686f6450772b50dedda10abfb06673a2a35a26 /src/roadveh_cmd.cpp | |
parent | af9521ff141848685c80e6d535b25965cb7bfb0f (diff) | |
download | openttd-4bb210614bd00b7a422fa4faec7974da6375a82c.tar.xz |
(svn r11332) -Fix: vehicles getting a value of 0 on construction.
-Fix: assertion when selling vehicles.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index f24a990e6..edb2c222a 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -202,6 +202,7 @@ CommandCost CmdBuildRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) const RoadVehicleInfo *rvi = RoadVehInfo(p1); + v = new (v) RoadVehicle(); v->unitnumber = unit_num; v->direction = DiagDirToDir(GetRoadDepotDirection(tile)); v->owner = _current_player; @@ -247,7 +248,6 @@ CommandCost CmdBuildRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) v->date_of_last_service = _date; v->build_year = _cur_year; - v = new (v) RoadVehicle(); v->cur_image = 0xC15; v->random_bits = VehicleRandomBits(); SetRoadVehFront(v); |