Changeset - r18285:a4e7d08664db
[Not reviewed]
master
0 1 0
yexo - 13 years ago 2011-11-08 15:00:55
yexo@openttd.org
(svn r23131) -Fix (r16165): AIOrder::IsCurrentOrderPartOfOrderList return false for valid vehicles and crashed for invalid ones
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_order.cpp
Show inline comments
 
@@ -128,7 +128,7 @@ static const Order *ResolveOrder(Vehicle
 

	
 
/* static */ bool AIOrder::IsCurrentOrderPartOfOrderList(VehicleID vehicle_id)
 
{
 
	if (AIVehicle::IsValidVehicle(vehicle_id)) return false;
 
	if (!AIVehicle::IsValidVehicle(vehicle_id)) return false;
 
	if (GetOrderCount(vehicle_id) == 0) return false;
 

	
 
	const Order *order = &::Vehicle::Get(vehicle_id)->current_order;
0 comments (0 inline, 0 general)