(svn r10084) -Fix [FS#855]: reversing a train when loading at a station crashed.

This commit is contained in:
rubidium 2007-06-10 20:27:28 +00:00
parent d0ad020dc6
commit 77b06e922f
1 changed files with 7 additions and 0 deletions

View File

@ -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;