summaryrefslogtreecommitdiff
path: root/ai/default
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
commit95adeec12709137102e65fc7e2996b3f742d25f1 (patch)
tree7ac367b2e44c41b1f746ca3e9e7bba2c34651e72 /ai/default
parent1b6ed11d7b615edaa2a7abce72a16975d0e41790 (diff)
downloadopenttd-95adeec12709137102e65fc7e2996b3f742d25f1.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/default')
-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;