summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index fa68a9247..d7d5b927d 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -275,10 +275,13 @@ CommandCost CmdBuildRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
InvalidateWindowClassesData(WC_ROADVEH_LIST, 0);
InvalidateWindow(WC_COMPANY, v->owner);
- if (IsLocalCompany())
+ if (IsLocalCompany()) {
InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Road window
+ }
GetCompany(_current_company)->num_engines[p1]++;
+
+ CheckConsistencyOfArticulatedVehicle(v);
}
return cost;