forked from mirror/OpenTTD
(svn r25424) -Fix: keep old flows around in an invalidated state to continue routing cargo if necessary
This commit is contained in:
@@ -79,6 +79,13 @@ public:
|
||||
*/
|
||||
inline const SharesMap *GetShares() const { return &this->shares; }
|
||||
|
||||
/**
|
||||
* Swap the shares maps, and thus the content of this FlowStat with the
|
||||
* other one.
|
||||
* @param other FlowStat to swap with.
|
||||
*/
|
||||
inline void SwapShares(FlowStat &other) { this->shares.swap(other.shares); }
|
||||
|
||||
/**
|
||||
* Get a station a package can be routed to. This done by drawing a
|
||||
* random number between 0 and sum_shares and then looking that up in
|
||||
@@ -94,6 +101,8 @@ public:
|
||||
|
||||
StationID GetVia(StationID excluded, StationID excluded2 = INVALID_STATION) const;
|
||||
|
||||
void Invalidate();
|
||||
|
||||
private:
|
||||
SharesMap shares; ///< Shares of flow to be sent via specified station (or consumed locally).
|
||||
};
|
||||
|
Reference in New Issue
Block a user