From c05d10dd355f5fcbfdf68066bc8d5cabff9f8e3b Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 2 Feb 2008 09:28:43 +0000 Subject: (svn r12042) -Fix [FS#1676]: Reimplement how rivers and canals are stored in the map, allowing the sea/river/canal status to also be stored for buoys, docks, locks and depots. All these are now allowed on rivers and removal of them will revert to the original water type. --- src/newgrf_canal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/newgrf_canal.cpp') diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index 1a276ea7d..df3d7630c 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -22,7 +22,8 @@ WaterFeature _water_feature[CF_END]; * three functions are stubs. */ static uint32 CanalGetRandomBits(const ResolverObject *object) { - return GetWaterTileRandomBits(object->u.canal.tile); + /* Return random bits only for water tiles, not station tiles */ + return IsTileType(object->u.canal.tile, MP_WATER) ? GetWaterTileRandomBits(object->u.canal.tile) : 0; } -- cgit v1.2.3-54-g00ecf