From 77b06e922fcb9d8a23e8fab3f07fc377c3c2a275 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 10 Jun 2007 20:27:28 +0000 Subject: (svn r10084) -Fix [FS#855]: reversing a train when loading at a station crashed. --- src/economy.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/economy.cpp b/src/economy.cpp index 194c535f3..9a8ff2161 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1468,6 +1468,13 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) return; } + if (v->type == VEH_TRAIN && !IsTileType(v->tile, MP_STATION)) { + /* The train reversed in the station. Take the "easy" way + * out and let the train just leave as it always did. */ + SETBIT(v->vehicle_flags, VF_LOADING_FINISHED); + return; + } + int unloading_time = 0; Vehicle *u = v; int result = 0; -- cgit v1.2.3-70-g09d2