home · contact · privacy
Server/py: Fix more memthing handling breakage.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 4 Mar 2015 11:28:45 +0000 (12:28 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 4 Mar 2015 11:28:45 +0000 (12:28 +0100)
plomrogue-server.py

index 299155df632a0668125255ae09e97587066e364d..7d4532108afdd14d76a513dc45603085b018e4de 100755 (executable)
@@ -382,11 +382,11 @@ def update_map_memory(t):
                 t["T_MEMMAP"][pos] = world_db["MAP"][pos]
             continue
         # TODO: Aging of MEMDEPTHMAP.
-    for id in t["T_MEMTHING"]:
-        y = world_db["Things"][id]["T_POSY"]
-        x = world_db["Things"][id]["T_POSY"]
+    for memthing in t["T_MEMTHING"]:
+        y = world_db["Things"][memthing[0]]["T_POSY"]
+        x = world_db["Things"][memthing[1]]["T_POSY"]
         if "v" == chr(t["fovmap"][(y * world_db["MAP_LENGTH"]) + x]):
-            t["T_MEMTHING"].remove(id)
+            t["T_MEMTHING"].remove(memthing)
     for id in world_db["Things"]:
         type = world_db["Things"][id]["T_TYPE"]
         if not world_db["ThingTypes"][type]["TT_LIFEPOINTS"]: