summaryrefslogtreecommitdiff
path: root/ai
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-26 18:48:23 +0000
committertron <tron@openttd.org>2006-03-26 18:48:23 +0000
commit369cba323061ca4c9703b950f9420717f5cc638f (patch)
tree7ac367b2e44c41b1f746ca3e9e7bba2c34651e72 /ai
parentf8e27fb2f6de335c06561e853ebbeab99d4112af (diff)
downloadopenttd-369cba323061ca4c9703b950f9420717f5cc638f.tar.xz
(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
Diffstat (limited to 'ai')
-rw-r--r--ai/default/default.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index e87079dc5..847ef12e9 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -359,7 +359,7 @@ static void AiHandleReplaceAircraft(Player *p)
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 @@ static void AiStateSellVeh(Player *p)
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;