-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)
{
}
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]++;
/* Update "t_eye"'s .mem_map memory with what's in its current FOV, and update
* and age the .mem_depth_map.
*/
-extern void update_map_memory(struct Thing * t_eye);
+extern void update_map_memory(struct Thing * t_eye, uint8_t age_map);
/* Build "t"'s field of view. */
extern void build_fov_map(struct Thing * t);
build_fov_map(t);
if (t == get_player())
{
- update_map_memory(t);
+ update_map_memory(t, 1);
}
}
}
build_fov_map(ti);
if (ti == get_player())
{
- update_map_memory(ti);
+ update_map_memory(ti, 0);
}
}
}
break;
}
}
- update_map_memory(get_player());
+ update_map_memory(get_player(), 1);
for (tt = world.thing_types; tt; tt = tt->next)
{
if (world.player_type != tt->id)
{
if (0 == thing->command)
{
- update_map_memory(thing);
+ update_map_memory(thing, 1);
if (thing == player)
{
break;