diff options
author | fonsinchen <fonsinchen@openttd.org> | 2013-10-22 16:13:54 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2013-10-22 16:13:54 +0000 |
commit | 6524849386fa7b24814db93746c2c07c3de8f1c0 (patch) | |
tree | 8fd05e9a727286abff1f36c1d69c4411e0c4052a /src/linkgraph | |
parent | 29e987f3fc13dc1e2a90f07556bf033b81a13e36 (diff) | |
download | openttd-6524849386fa7b24814db93746c2c07c3de8f1c0.tar.xz |
(svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore.
Diffstat (limited to 'src/linkgraph')
-rw-r--r-- | src/linkgraph/linkgraphjob.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp index 242689e8d..ac22a38a4 100644 --- a/src/linkgraph/linkgraphjob.cpp +++ b/src/linkgraph/linkgraphjob.cpp @@ -69,6 +69,9 @@ LinkGraphJob::~LinkGraphJob() (*lg)[node_id][it->first].LastUpdate() == INVALID_DATE) { /* Edge has been removed. Delete flows. */ flows.DeleteFlows(to); + } else if ((*lg)[node_id][it->first].LastUnrestrictedUpdate() == INVALID_DATE) { + /* Edge is fully restricted. */ + flows.RestrictFlows(to); } } |