(svn r20533) -Codechange: shuffle a bit with the bits in the sell command

This commit is contained in:
rubidium
2010-08-18 00:03:08 +00:00
parent c57a5b735a
commit 9d814f04dd
3 changed files with 12 additions and 10 deletions

View File

@@ -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, GetCmdSellVeh(v));
return AIObject::DoCommand(0, vehicle_id | (v->type == VEH_TRAIN ? 1 : 0) << 16, 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, CMD_SELL_VEHICLE);
return AIObject::DoCommand(0, v->index | (sell_attached_wagons ? 1 : 0) << 16, 0, CMD_SELL_VEHICLE);
}
/* static */ bool AIVehicle::SellWagon(VehicleID vehicle_id, int wagon)