diff options
author | frosch <frosch@openttd.org> | 2011-01-09 13:53:57 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-01-09 13:53:57 +0000 |
commit | 35be634974abbd5a78429ef114cff16c78eb555a (patch) | |
tree | 6a508b64741c6be0d9ac5b680036edbe693f0d34 | |
parent | 8ffc288901163dd49e69938bb49930a5db6a2d34 (diff) | |
download | openttd-35be634974abbd5a78429ef114cff16c78eb555a.tar.xz |
(svn r21746) -Fix: [NewGRF] Canal variable 83 accessed water random bits also for non-water tiles (e.g. watery industries or objects).
-rw-r--r-- | src/newgrf_canal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index 4d28d3cef..a1753fcd3 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -58,7 +58,7 @@ static uint32 CanalGetVariable(const ResolverObject *object, byte variable, byte case 0x81: return GetTerrainType(tile); /* Random data for river or canal tiles, otherwise zero */ - case 0x83: return GetWaterTileRandomBits(tile); + case 0x83: return IsTileType(tile, MP_WATER) ? GetWaterTileRandomBits(tile) : 0; } DEBUG(grf, 1, "Unhandled canal variable 0x%02X", variable); |