summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-11-30 23:21:16 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit41fa16f3254ffa9f44b85d6570a2293e8438b427 (patch)
treea508634b7dea7a0937e92c143db0a392cd99a4b0 /src/train_cmd.cpp
parent57b82e2e99aa30a649d1fd80f192ccf5338dc7c4 (diff)
downloadopenttd-41fa16f3254ffa9f44b85d6570a2293e8438b427.tar.xz
Codechange: Don't use globals for return values from vehicle command procs.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 6bb8d0986..2fd081898 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -641,8 +641,6 @@ static CommandCost CmdBuildRailWagon(DoCommandFlag flags, TileIndex tile, const
AddArticulatedParts(v);
- _new_vehicle_id = v->index;
-
v->UpdatePosition();
v->First()->ConsistChanged(CCF_ARRANGE);
UpdateTrainGroupID(v->First());
@@ -762,7 +760,6 @@ CommandCost CmdBuildRailVehicle(DoCommandFlag flags, TileIndex tile, const Engin
v->max_age = e->GetLifeLengthInDays();
v->railtype = rvi->railtype;
- _new_vehicle_id = v->index;
v->SetServiceInterval(Company::Get(_current_company)->settings.vehicle.servint_trains);
v->date_of_last_service = _date;