diff options
author | rubidium <rubidium@openttd.org> | 2010-02-15 23:55:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-02-15 23:55:04 +0000 |
commit | 3626eb340e5996a9a9e1fa84c9b4023ecc55c952 (patch) | |
tree | 3f68cb7f3847ac2c7c4c067ffd1bc498879dc51e /src/waypoint_base.h | |
parent | 80225cf2461731283ea78fde212515806718b61f (diff) | |
download | openttd-3626eb340e5996a9a9e1fa84c9b4023ecc55c952.tar.xz |
(svn r19141) -Fix [FS#3619] (r18421): look-ahead for multitile waypoints 'made up' data that shouldn't go into the cache, causing desyncs in MP
Diffstat (limited to 'src/waypoint_base.h')
-rw-r--r-- | src/waypoint_base.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/waypoint_base.h b/src/waypoint_base.h index eb8074900..3f8a48db9 100644 --- a/src/waypoint_base.h +++ b/src/waypoint_base.h @@ -40,6 +40,15 @@ struct Waypoint : SpecializedStation<Waypoint, true> { { return 1; } + + /** + * Is this a single tile waypoint? + * @return true if it is. + */ + FORCEINLINE bool IsSingleTile() const + { + return (this->facilities & FACIL_TRAIN) != 0 && this->train_station.w == 1 && this->train_station.h == 1; + } }; #define FOR_ALL_WAYPOINTS(var) FOR_ALL_BASE_STATIONS_OF_TYPE(Waypoint, var) |