summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-10-28 14:37:33 +0000
committertron <tron@openttd.org>2006-10-28 14:37:33 +0000
commit8908ea67d5d01f1a00e3d4d507ada67bc47bec9b (patch)
treec6875a9b768a90456ededb533f34977158338bf9 /aircraft_cmd.c
parent377b178c11011731eebbb9cb280434196b8ffec4 (diff)
downloadopenttd-8908ea67d5d01f1a00e3d4d507ada67bc47bec9b.tar.xz
(svn r6994) -Regression (r6291): When sending an aircrafts to a hangar the wrong bit gets tested to determine if a aircraft should stop there or just get serviced
Also remove a stale comment Both spotted and fixed by Mart3p
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 1bec78aff..097641a66 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -535,7 +535,6 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
}
} else {
bool next_airport_has_hangar = true;
- /* If bit 17 is set, next airport is specified by low word of p2, otherwise it's the target airport */
StationID next_airport_index = v->u.air.targetairport;
const Station *st = GetStation(next_airport_index);
/* If the station is not a valid airport or if it has no hangars */
@@ -556,7 +555,7 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
if (flags & DC_EXEC) {
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;
- if (!(p1 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
+ if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
v->current_order.dest = next_airport_index;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
if (p2 & DEPOT_LOCATE_HANGAR || (p2 & DEPOT_SERVICE && v->u.air.state == FLYING && !next_airport_has_hangar)) {