summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-27 22:26:21 +0000
committerrubidium <rubidium@openttd.org>2010-08-27 22:26:21 +0000
commit536bb704b7bd4d15302e6e2f0200184af151cb73 (patch)
tree4e59ca5a88842082b129dffae41b33cf3670d15e /src/object_cmd.cpp
parent3e9e1b8e659c7fe36ac2188fb86ac601a8210d50 (diff)
downloadopenttd-536bb704b7bd4d15302e6e2f0200184af151cb73.tar.xz
(svn r20639) -Add: random bits to object tiles
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index c92ff4580..5c39529c8 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -63,7 +63,8 @@ void BuildObject(ObjectType type, TileIndex tile, CompanyID owner, Town *town)
assert(o->town != NULL);
TILE_AREA_LOOP(t, ta) {
- MakeObject(t, type, owner, o->index, WATER_CLASS_INVALID);
+ WaterClass wc = (IsWaterTile(t) ? GetWaterClass(t) : WATER_CLASS_INVALID);
+ MakeObject(t, type, owner, o->index, wc, Random());
MarkTileDirtyByTile(t);
}
}