summaryrefslogtreecommitdiff
path: root/src/linkgraph
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-08-23 18:37:45 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-08-23 18:37:45 +0000
commitbcbaa92485d407463be650397518844484e5f3ff (patch)
tree02cad53202501b768cac8db0fa4869728c164e39 /src/linkgraph
parentf719b273d3c914c1297ca75748d8b64b71c5939e (diff)
downloadopenttd-bcbaa92485d407463be650397518844484e5f3ff.tar.xz
(svn r25741) -Fix: shift join dates of link graph jobs when using the date cheat
Diffstat (limited to 'src/linkgraph')
-rw-r--r--src/linkgraph/linkgraphjob.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h
index e4df614a8..79231c754 100644
--- a/src/linkgraph/linkgraphjob.h
+++ b/src/linkgraph/linkgraphjob.h
@@ -60,7 +60,7 @@ protected:
const LinkGraph link_graph; ///< Link graph to by analyzed. Is copied when job is started and mustn't be modified later.
const LinkGraphSettings settings; ///< Copy of _settings_game.linkgraph at spawn time.
ThreadObject *thread; ///< Thread the job is running in or NULL if it's running in the main thread.
- const Date join_date; ///< Date when the job is to be joined.
+ Date join_date; ///< Date when the job is to be joined.
NodeAnnotationVector nodes; ///< Extra node data necessary for link graph calculation.
EdgeAnnotationMatrix edges; ///< Extra edge data necessary for link graph calculation.
@@ -282,6 +282,12 @@ public:
inline Date JoinDate() const { return join_date; }
/**
+ * Change the join date on date cheating.
+ * @param interval Number of days to add.
+ */
+ inline void ShiftJoinDate(int interval) { this->join_date += interval; }
+
+ /**
* Get the link graph settings for this component.
* @return Settings.
*/