summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-03-10 21:44:22 +0000
committerrubidium <rubidium@openttd.org>2007-03-10 21:44:22 +0000
commitb510eaaca5a898a99b48f728b4acbdd50dca5965 (patch)
tree23291c4fffd8dd7ba4fc76369dcba3706aacd711 /src/water_cmd.cpp
parent3ccc5e7b27b2e3f759cfa146a7f35d028dcdc55a (diff)
downloadopenttd-b510eaaca5a898a99b48f728b4acbdd50dca5965.tar.xz
(svn r9105) -Fix [FS#629]: disable the ability to make flooding water with the canal build tool. In the scenario editor you can still make both canals and flooding water at height level 0.
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 4b1270797..5643aa8fe 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -212,7 +212,7 @@ int32 CmdBuildLock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/** Build a piece of canal.
* @param tile end tile of stretch-dragging
* @param p1 start tile of stretch-dragging
- * @param p2 ctrl pressed - toggles ocean / canals at sealevel
+ * @param p2 ctrl pressed - toggles ocean / canals at sealevel (ocean only allowed in the scenario editor)
*/
int32 CmdBuildCanal(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
@@ -223,6 +223,8 @@ int32 CmdBuildCanal(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
int sx, sy;
if (p1 >= MapSize()) return CMD_ERROR;
+ /* Outside of the editor you can only build canals, not oceans */
+ if (HASBIT(p2, 0) && _game_mode != GM_EDITOR) return CMD_ERROR;
x = TileX(tile);
y = TileY(tile);