summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-24 00:08:48 +0000
committerrubidium <rubidium@openttd.org>2009-07-24 00:08:48 +0000
commitc1ffbc3bceafb9a0a47680dc28d010396924bc5c (patch)
tree560b006e657e27a09e804ffdec1fb42336b61529 /src
parentf5731ca473b7722510741a161cf12c2343d851e1 (diff)
downloadopenttd-c1ffbc3bceafb9a0a47680dc28d010396924bc5c.tar.xz
(svn r16933) -Fix [FS#3054] (r16694): vehicles would wait "very long" when they had nothing to unload and gradual loading was disabled.
Diffstat (limited to 'src')
-rw-r--r--src/economy.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 973e0754c..6052c524e 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -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);