summaryrefslogtreecommitdiff
path: root/src/station_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-08-22 17:11:59 +0000
committerrubidium <rubidium@openttd.org>2014-08-22 17:11:59 +0000
commit134ad63b803ca160aa4aaf943cf28bbc58fa381b (patch)
tree24ee3101c371588330bb4fba44bb2a92766655ea /src/station_base.h
parente458661fb65d72766d6a7f7a3ea9e4b5bff6d4c5 (diff)
downloadopenttd-134ad63b803ca160aa4aaf943cf28bbc58fa381b.tar.xz
(svn r26753) -Fix: desync due to not always properly restoring game state from the savegame
Diffstat (limited to 'src/station_base.h')
-rw-r--r--src/station_base.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/station_base.h b/src/station_base.h
index 944a731f2..6d6522840 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -48,12 +48,13 @@ public:
* Create a FlowStat with an initial entry.
* @param st Station the initial entry refers to.
* @param flow Amount of flow for the initial entry.
+ * @param restricted If the flow to be added is restricted.
*/
- inline FlowStat(StationID st, uint flow)
+ inline FlowStat(StationID st, uint flow, bool restricted = false)
{
assert(flow > 0);
this->shares[flow] = st;
- this->unrestricted = flow;
+ this->unrestricted = restricted ? 0 : flow;
}
/**