diff options
author | frosch <frosch@openttd.org> | 2016-05-22 11:45:03 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2016-05-22 11:45:03 +0000 |
commit | d188d02384387d9cb1e293abc6bc616c72de6850 (patch) | |
tree | d618120b1207137d3a0ba0b6f521c128142cb4e8 | |
parent | cade383f9b0eaf17bf6c3e05a3470c4f53039d0d (diff) | |
download | openttd-d188d02384387d9cb1e293abc6bc616c72de6850.tar.xz |
(svn r27580) -Fix [FS#6395]: Set date of last service on construction also for wagons and articulated parts.
-rw-r--r-- | src/articulated_vehicles.cpp | 1 | ||||
-rw-r--r-- | src/train_cmd.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index 193c5ac4a..8c372e7ea 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -433,6 +433,7 @@ void AddArticulatedParts(Vehicle *first) v->x_pos = first->x_pos; v->y_pos = first->y_pos; v->z_pos = first->z_pos; + v->date_of_last_service = first->date_of_last_service; v->build_year = first->build_year; v->vehstatus = first->vehstatus & ~VS_STOPPED; diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 6f2feeaab..dca456d97 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -636,6 +636,7 @@ static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const v->railtype = rvi->railtype; + v->date_of_last_service = _date; v->build_year = _cur_year; v->cur_image = SPR_IMG_QUERY; v->random_bits = VehicleRandomBits(); @@ -703,6 +704,7 @@ static void AddRearEngineToMultiheadedTrain(Train *v) u->refit_cap = v->refit_cap; u->railtype = v->railtype; u->engine_type = v->engine_type; + u->date_of_last_service = v->date_of_last_service; u->build_year = v->build_year; u->cur_image = SPR_IMG_QUERY; u->random_bits = VehicleRandomBits(); |