(svn r16933) -Fix [FS#3054] (r16694): vehicles would wait "very long" when they had nothing to unload and gradual loading was disabled.

This commit is contained in:
rubidium 2009-07-24 00:08:48 +00:00
parent f5731ca473
commit c1ffbc3bce

View File

@ -1505,7 +1505,8 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
}
}
v->load_unload_time_rem = unloading_time;
/* Always wait at least 1, otherwise we'll wait 'infinitively' long. */
v->load_unload_time_rem = max(1, unloading_time);
if (completely_emptied) {
TriggerVehicle(v, VEHICLE_TRIGGER_EMPTY);