summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstormcone <48624099+stormcone@users.noreply.github.com>2019-07-23 21:31:45 +0200
committerMichael Lutz <michi@icosahedron.de>2019-07-23 23:15:08 +0200
commit2e686ad5d5cb3ae0a3e50b79050af74f672e7854 (patch)
tree6523fe275e054d18eb212a911f315365208659ba
parent2817cd41f1b42a7d3901a92c6cda85a90765600a (diff)
downloadopenttd-2e686ad5d5cb3ae0a3e50b79050af74f672e7854.tar.xz
Fix #7667: Buying an engine after buying wagons doesn't give a complete train.
-rw-r--r--src/vehicle_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index 94492e344..a1ea3590a 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -139,10 +139,10 @@ CommandCost CmdBuildVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
Vehicle *v = nullptr;
switch (type) {
- case VEH_TRAIN: value.AddCost(CmdBuildRailVehicle(tile, subflags, e, GB(p1, 24, 8), &v)); break;
- case VEH_ROAD: value.AddCost(CmdBuildRoadVehicle(tile, subflags, e, GB(p1, 24, 8), &v)); break;
- case VEH_SHIP: value.AddCost(CmdBuildShip (tile, subflags, e, GB(p1, 24, 8), &v)); break;
- case VEH_AIRCRAFT: value.AddCost(CmdBuildAircraft (tile, subflags, e, GB(p1, 24, 8), &v)); break;
+ case VEH_TRAIN: value.AddCost(CmdBuildRailVehicle(tile, subflags, e, GB(p1, 16, 8), &v)); break;
+ case VEH_ROAD: value.AddCost(CmdBuildRoadVehicle(tile, subflags, e, GB(p1, 16, 8), &v)); break;
+ case VEH_SHIP: value.AddCost(CmdBuildShip (tile, subflags, e, GB(p1, 16, 8), &v)); break;
+ case VEH_AIRCRAFT: value.AddCost(CmdBuildAircraft (tile, subflags, e, GB(p1, 16, 8), &v)); break;
default: NOT_REACHED(); // Safe due to IsDepotTile()
}