(svn r20532) -Codechange: unify selling of vehicles a bit

This commit is contained in:
rubidium
2010-08-17 23:55:22 +00:00
parent c14853b72e
commit 4780cc50b2
8 changed files with 57 additions and 139 deletions

View File

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