summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-05-19 14:22:04 +0000
committerrubidium <rubidium@openttd.org>2013-05-19 14:22:04 +0000
commit39474532777a1f7beadfd940abf29292bc39879a (patch)
tree59165ada9556ce5b154ec31cbb994827e7e90fe6 /src/economy.cpp
parent0cc3d8df4b79628c702ba1293cdc00c099dd0b60 (diff)
downloadopenttd-39474532777a1f7beadfd940abf29292bc39879a.tar.xz
(svn r25259) -Codechange: track capacities and usage of links
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 9c599dafc..aa7d94ce3 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1615,6 +1615,13 @@ static void LoadUnloadVehicle(Vehicle *front)
} else if (cargo_not_full != 0) {
finished_loading = false;
}
+
+ /* Refresh next hop stats if we're full loading to make the links
+ * known to the distribution algorithm and allow cargo to be sent
+ * along them. Otherwise the vehicle could wait for cargo
+ * indefinitely if it hasn't visited the other links yet, or if the
+ * links die while it's loading. */
+ if (!finished_loading) front->RefreshNextHopsStats();
}
unloading_time = 20;