From 3a9b266ee5f6bdecab5b1c895923c3373cca7dca Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 24 Feb 2016 00:39:19 +0100
Subject: [PATCH] Server: Inform player about his inability to swim on move
 towards water.

---
 server/commands.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/server/commands.py b/server/commands.py
index f20297d..3717202 100644
--- a/server/commands.py
+++ b/server/commands.py
@@ -499,6 +499,9 @@ def play_move(str_arg):
         move_result = mv_yx_in_dir_legal(chr(dir), t["T_POSY"], t["T_POSX"])
         if 1 == move_result[0]:
             pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2]
+            if ord("~") == world_db["MAP"][pos]:
+                log("You can't SWIM.")
+                return
             if chr(world_db["MAP"][pos]) in symbols_passable:
                 world_db["Things"][0]["T_ARGUMENT"] = dir
                 set_command("move")
-- 
2.30.2