home · contact · privacy
Fix bug in seeing_thing().
authorChristian Heller <c.heller@plomlompom.de>
Sun, 15 Mar 2015 03:14:49 +0000 (04:14 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 15 Mar 2015 03:14:49 +0000 (04:14 +0100)
roguelike-server

index 0bb69884d40f31adbd73d16e23efe89c71e0cea4..3c4fd894b9c187553d71f9eaf984102615ac5274 100755 (executable)
@@ -1167,11 +1167,13 @@ def get_dir_to_target(t, filter):
         if t["fovmap"] and "a" == filter:
             for id in world_db["Things"]:
                 if animate_in_fov(world_db["Things"][id]):
-                    return good_attack_target(world_db["Things"][id])
+                    if good_attack_target(world_db["Things"][id]):
+                        return True
         elif t["fovmap"] and "f" == filter:
             for id in world_db["Things"]:
                 if animate_in_fov(world_db["Things"][id]):
-                    return good_flee_target(world_db["Things"][id])
+                    if good_flee_target(world_db["Things"][id]):
+                        return True
         elif t["T_MEMMAP"] and "c" == filter:
             eat_cost = eat_vs_hunger_threshold(t["T_TYPE"])
             for mt in t["T_MEMTHING"]: