home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf2752f
)
Minor optimization in update_map_memory().
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 11 Mar 2015 04:30:18 +0000
(
05:30
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 11 Mar 2015 04:30:18 +0000
(
05:30
+0100)
roguelike-server
patch
|
blob
|
history
diff --git
a/roguelike-server
b/roguelike-server
index 809e03a12c1129cabf215ceb1f8218e3aa65b871..72f2e1461c52d4ae3d451d261dd6a6a6e229d4fe 100755
(executable)
--- a/
roguelike-server
+++ b/
roguelike-server
@@
-504,10
+504,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()
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"]
for id in [id for id in world_db["Things"]
if not world_db["Things"][id]["carried"]]:
type = world_db["Things"][id]["T_TYPE"]