src/newgrf_canal.cpp
changeset 8471 ba4c15fe147b
parent 8372 49f8ca06527d
child 8756 b6f8dc6a246f
equal deleted inserted replaced
8470:ea11349a25ed 8471:ba4c15fe147b
    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 {