home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Server/py: Optimize init_score_map().
[plomrogue]
/
src
/
server
/
field_of_view.c
diff --git
a/src/server/field_of_view.c
b/src/server/field_of_view.c
index dc60442e3ff28a835d462f5e3ca877b5c938fa2c..45c90e6c0a6f6dc7da76db9938c529f8124076b2 100644
(file)
--- a/
src/server/field_of_view.c
+++ b/
src/server/field_of_view.c
@@
-308,7
+308,7
@@
static void add_things_to_map_memory(struct Thing * t_eye)
-extern void update_map_memory(struct Thing * t_eye)
+extern void update_map_memory(struct Thing * t_eye
, uint8_t age_map
)
{
if (!t_eye->mem_map)
{
{
if (!t_eye->mem_map)
{
@@
-330,7
+330,8
@@
extern void update_map_memory(struct Thing * t_eye)
}
continue;
}
}
continue;
}
- if ( '0' <= t_eye->mem_depth_map[i] && '9' > t_eye->mem_depth_map[i]
+ if (age_map &&
+ '0' <= t_eye->mem_depth_map[i] && '9' > t_eye->mem_depth_map[i]
&& !(rrand() % (uint16_t) pow(2, t_eye->mem_depth_map[i] - 48)))
{
t_eye->mem_depth_map[i]++;
&& !(rrand() % (uint16_t) pow(2, t_eye->mem_depth_map[i] - 48)))
{
t_eye->mem_depth_map[i]++;