changeset 12496:99f1ec9a1940 draft

(svn r16933) -Fix [FS#3054] (r16694): vehicles would wait "very long" when they had nothing to unload and gradual loading was disabled.
author rubidium <rubidium@openttd.org>
date Fri, 24 Jul 2009 00:08:48 +0000
parents d260a6a837ee
children 73d75faa3cb0
files src/economy.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1505,7 +1505,8 @@
 		}
 	}
 
-	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);