(svn r5279) -Backport: r4116 0.4
authortron
Thu, 15 Jun 2006 14:16:57 +0000
branch0.4
changeset 10033 cce7f27e214d
parent 10032 fcf09abbde96
child 10034 76c349a8330a
(svn r5279) -Backport: r4116
-Fix: The AI should send a plane into a hangar if it's not in a hangar _or_ not stopped, not when it's not in a hangar _and_ not stopped
ai/default/default.c
--- a/ai/default/default.c	Mon Jun 05 08:30:58 2006 +0000
+++ b/ai/default/default.c	Thu Jun 15 14:16:57 2006 +0000
@@ -351,7 +351,7 @@
 	BackuppedOrders orderbak[1];
 	EngineID veh;
 
-	if (!IsAircraftHangarTile(v->tile) && !(v->vehstatus&VS_STOPPED)) {
+	if (!IsAircraftHangarTile(v->tile) || !(v->vehstatus&VS_STOPPED)) {
 		AiHandleGotoDepot(p, CMD_SEND_AIRCRAFT_TO_HANGAR);
 		return;
 	}
@@ -3575,7 +3575,7 @@
 
 			DoCommandByTile(0, v->index, 0, DC_EXEC, CMD_SELL_ROAD_VEH);
 		} else if (v->type == VEH_Aircraft) {
-			if (!IsAircraftHangarTile(v->tile) && !(v->vehstatus&VS_STOPPED)) {
+			if (!IsAircraftHangarTile(v->tile) || !(v->vehstatus & VS_STOPPED)) {
 				if (v->current_order.type != OT_GOTO_DEPOT)
 					DoCommandByTile(0, v->index, 0, DC_EXEC, CMD_SEND_AIRCRAFT_TO_HANGAR);
 				goto going_to_depot;