src/vehicle.cpp
changeset 9891 edc31db66fbb
parent 9808 a914bcdca6fb
child 9914 c07d0352d8d5
--- a/src/vehicle.cpp	Sun Aug 10 19:00:33 2008 +0000
+++ b/src/vehicle.cpp	Sun Aug 10 21:56:47 2008 +0000
@@ -2345,8 +2345,16 @@
 	HideFillingPercent(this->fill_percent_te_id);
 	this->fill_percent_te_id = INVALID_TE_ID;
 
-	/* Trigger station animation for trains only */
-	if (this->type == VEH_TRAIN && IsTileType(this->tile, MP_STATION)) StationAnimationTrigger(st, this->tile, STAT_ANIM_TRAIN_DEPARTS);
+	if (this->type == VEH_TRAIN) {
+		/* Trigger station animation (trains only) */
+		if (IsTileType(this->tile, MP_STATION)) StationAnimationTrigger(st, this->tile, STAT_ANIM_TRAIN_DEPARTS);
+
+		/* Try to reserve a path when leaving the station as we
+		 * might not be marked as wanting a reservation, e.g.
+		 * when an overlenght train gets turned around in a station.
+		 */
+		TryPathReserve(this, true, true);
+	}
 }