changeset 17938:cc75c5d84f65 draft

(svn r22743) -Fix [FS#4696]: Make aircraft point to the exit when leaving the hangar.
author alberth <alberth@openttd.org>
date Sat, 13 Aug 2011 12:47:18 +0000
parents a49cf37111ac
children 5da57f628072
files src/aircraft_cmd.cpp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1248,12 +1248,18 @@
 	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();