Mercurial > hg > openttd
diff src/roadveh_cmd.cpp @ 7782:f81103463949 draft
(svn r11332) -Fix: vehicles getting a value of 0 on construction.
-Fix: assertion when selling vehicles.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 21 Oct 2007 16:45:00 +0000 (2007-10-21) |
parents | 529cd49be451 |
children | e5c29f8ae0cd |
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -202,6 +202,7 @@ 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 @@ 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);