(svn 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
authortron
Sun, 26 Mar 2006 18:48:23 +0000
changeset 3336 8788ab752ad3
parent 3335 7fed9aa64770
child 3337 07e476ea35b5
(svn 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	Sun Mar 26 16:29:20 2006 +0000
+++ b/ai/default/default.c	Sun Mar 26 18:48:23 2006 +0000
@@ -359,7 +359,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;
 	}
@@ -3504,7 +3504,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;