summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_vehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-19 20:45:29 +0000
committerrubidium <rubidium@openttd.org>2010-08-19 20:45:29 +0000
commitcc658392ebef76ca21efc7c3ab1aaaa93c50448e (patch)
treeb5927fb50b80510e15aa0bc9e42ef24b66c17850 /src/ai/api/ai_vehicle.cpp
parent646fbb628aa1e19a19d02a3ad8abf24146fe5a12 (diff)
downloadopenttd-cc658392ebef76ca21efc7c3ab1aaaa93c50448e.tar.xz
(svn r20573) -Codechange: free/reserve some bits in the sell vehicle command to increase the vehicle pool limit
Diffstat (limited to 'src/ai/api/ai_vehicle.cpp')
-rw-r--r--src/ai/api/ai_vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp
index bacf10935..a816c73f1 100644
--- a/src/ai/api/ai_vehicle.cpp
+++ b/src/ai/api/ai_vehicle.cpp
@@ -137,7 +137,7 @@
EnforcePrecondition(false, IsValidVehicle(vehicle_id));
const Vehicle *v = ::Vehicle::Get(vehicle_id);
- return AIObject::DoCommand(0, vehicle_id | (v->type == VEH_TRAIN ? 1 : 0) << 16, 0, GetCmdSellVeh(v));
+ return AIObject::DoCommand(0, vehicle_id | (v->type == VEH_TRAIN ? 1 : 0) << 20, 0, GetCmdSellVeh(v));
}
/* static */ bool AIVehicle::_SellWagonInternal(VehicleID vehicle_id, int wagon, bool sell_attached_wagons)
@@ -148,7 +148,7 @@
const Train *v = ::Train::Get(vehicle_id);
while (wagon-- > 0) v = v->GetNextUnit();
- return AIObject::DoCommand(0, v->index | (sell_attached_wagons ? 1 : 0) << 16, 0, CMD_SELL_VEHICLE);
+ return AIObject::DoCommand(0, v->index | (sell_attached_wagons ? 1 : 0) << 20, 0, CMD_SELL_VEHICLE);
}
/* static */ bool AIVehicle::SellWagon(VehicleID vehicle_id, int wagon)