home · contact · privacy
Server/py: Fix logging bug in actor_move().
authorChristian Heller <c.heller@plomlompom.de>
Sun, 8 Mar 2015 00:28:20 +0000 (01:28 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 8 Mar 2015 00:28:20 +0000 (01:28 +0100)
plomrogue-server.py

index b08899a5a67d40c4ab8aafcacc7012732578898c..b22701f8405c3e0e9959dda6781d96f2cb1722c1 100755 (executable)
@@ -622,8 +622,9 @@ def actor_move(t):
             world_db["Things"][id]["T_POSY"] = move_result[1]
             world_db["Things"][id]["T_POSX"] = move_result[2]
         build_fov_map(t)
-        strong_write(io_db["file_out"], "LOG You move " + dir + ".\n")
-    else:
+        if t == world_db["Things"][0]:
+            strong_write(io_db["file_out"], "LOG You move " + dir + ".\n")
+    elif t == world_db["Things"][0]:
         strong_write(io_db["file_out"], "LOG You fail to move " + dir + ".\n")