From 4f3d161dd4cadfec8d1783d5fce1fc01999a37db Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Tue, 1 Sep 2015 00:56:48 +0200 Subject: [PATCH] Minor optimization in update_map_memory(). --- roguelike-server | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/roguelike-server b/roguelike-server index 77c53d4..56354d5 100755 --- a/roguelike-server +++ b/roguelike-server @@ -500,10 +500,9 @@ def update_map_memory(t, age_map=True): t["T_MEMMAP"][pos] = world_db["MAP"][pos] if age_map: age_some_memdepthmap_on_nonfov_cells() - for mt in [mt for mt in t["T_MEMTHING"] - if ord_v == t["fovmap"][(mt[1] * world_db["MAP_LENGTH"]) - + mt[2]]]: - t["T_MEMTHING"].remove(mt) + t["T_MEMTHING"] = [mt for mt in t["T_MEMTHING"] + if ord_v != t["fovmap"][(mt[1] * world_db["MAP_LENGTH"]) + + mt[2]]] for id in [id for id in world_db["Things"] if not world_db["Things"][id]["carried"]]: type = world_db["Things"][id]["T_TYPE"] -- 2.30.2