summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
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);
}
}