(svn r15345) -Add [NoAI]: Add AIVehicle::HasSharedOrders() and AIVehicleList_SharedOrders.

This commit is contained in:
Yexo
2009-02-05 01:12:49 +00:00
parent 85594561e0
commit 8f51ee50c1
6 changed files with 65 additions and 0 deletions

View File

@@ -390,3 +390,11 @@
default: NOT_REACHED();
}
}
/* static */ bool AIVehicle::HasSharedOrders(VehicleID vehicle_id)
{
if (!IsValidVehicle(vehicle_id)) return false;
Vehicle *v = ::GetVehicle(vehicle_id);
return v->orders.list != NULL && v->orders.list->GetNumVehicles() > 1;
}