(svn r17222) -Fix [FS#3129, FS#3130]: with time tables vehicles would stay in the 'loading' state after they have finished loading

This commit is contained in:
rubidium 2009-08-19 15:27:55 +00:00
parent 5a863925ee
commit 0780dc8138
1 changed files with 4 additions and 0 deletions

View File

@ -1107,6 +1107,10 @@ void PrepareUnload(Vehicle *front_v)
static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
{
assert(v->current_order.IsType(OT_LOADING));
/* When we've finished loading we're just staying here till the timetable 'runs' out */
if (HasBit(v->vehicle_flags, VF_LOADING_FINISHED)) return;
assert(v->load_unload_time_rem != 0);
/* We have not waited enough time till the next round of loading/unloading */