comparison src/newgrf_canal.cpp @ 8471:1e4ea519bfaf draft

(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.
author peter1138 <peter1138@openttd.org>
date Sat, 02 Feb 2008 09:28:43 +0000
parents 2628bf7d5b77
children ae0ec91bb55e
comparison
equal deleted inserted replaced
8470:4a0f0d97a7d9 8471:1e4ea519bfaf
20 20
21 /* Random bits and triggers are not supported for canals, so the following 21 /* Random bits and triggers are not supported for canals, so the following
22 * three functions are stubs. */ 22 * three functions are stubs. */
23 static uint32 CanalGetRandomBits(const ResolverObject *object) 23 static uint32 CanalGetRandomBits(const ResolverObject *object)
24 { 24 {
25 return GetWaterTileRandomBits(object->u.canal.tile); 25 /* Return random bits only for water tiles, not station tiles */
26 return IsTileType(object->u.canal.tile, MP_WATER) ? GetWaterTileRandomBits(object->u.canal.tile) : 0;
26 } 27 }
27 28
28 29
29 static uint32 CanalGetTriggers(const ResolverObject *object) 30 static uint32 CanalGetTriggers(const ResolverObject *object)
30 { 31 {