summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2011-08-13 12:47:18 +0000
committeralberth <alberth@openttd.org>2011-08-13 12:47:18 +0000
commit6aa6c65db8613c504424affe4e8c745735b99a52 (patch)
tree416d6df5788d5a447b2f7b9df8ca3a74611ecc81 /src/aircraft_cmd.cpp
parentc4118e3f6a7f007086ad210431b0fdb73ae0ce27 (diff)
downloadopenttd-6aa6c65db8613c504424affe4e8c745735b99a52.tar.xz
(svn r22743) -Fix [FS#4696]: Make aircraft point to the exit when leaving the hangar.
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index ce969a533..10820436e 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1248,12 +1248,18 @@ void AircraftNextAirportPos_and_Order(Aircraft *v)
v->pos = v->previous_pos = AircraftGetEntryPoint(v, apc, rotation);
}
+/**
+ * Aircraft is about to leave the hangar.
+ * @param v Aircraft leaving.
+ */
void AircraftLeaveHangar(Aircraft *v)
{
+ const Station *st = Station::GetByTile(v->tile);
+
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 0;
- v->direction = DIR_SE;
+ v->direction = st->airport.GetHangarExitDirection(v->tile);
v->vehstatus &= ~VS_HIDDEN;
{
Vehicle *u = v->Next();