X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fserver%2Ffield_of_view.c;h=45c90e6c0a6f6dc7da76db9938c529f8124076b2;hb=c89e7df6e7b6b64037b5b964e10a63ad38f86eb5;hp=8a162d8020c45579e250c9a6c58a14cc64204fff;hpb=bf396f111317663bba3950e57968af19f2f56a44;p=plomrogue
diff --git a/src/server/field_of_view.c b/src/server/field_of_view.c
index 8a162d8..45c90e6 100644
--- a/src/server/field_of_view.c
+++ b/src/server/field_of_view.c
@@ -65,6 +65,12 @@ static uint8_t shade_hex(uint32_t left_angle, uint32_t right_angle,
uint32_t middle_angle, struct shadow_angle ** shadows,
uint16_t pos_in_map, char * fov_map);
+/* To "shadows", add shadow defined by "left_angle" and "right_angle", either as
+ * new entry or as part of an existing shadow (swallowed whole or extending it).
+ */
+static void set_shadow(uint32_t left_angle, uint32_t right_angle,
+ struct shadow_angle ** shadows);
+
/* Free shadow angles list "angles". */
static void free_angles(struct shadow_angle * angles);
@@ -195,9 +201,6 @@ static uint8_t shade_hex(uint32_t left_angle, uint32_t right_angle,
-/* To "shadows", add shadow defined by "left_angle" and "right_angle", either as
- * new entry or as part of an existing shadow (swallowed whole or extending it).
- */
static void set_shadow(uint32_t left_angle, uint32_t right_angle,
struct shadow_angle ** shadows)
{
@@ -305,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)
{
@@ -327,7 +330,8 @@ extern void update_map_memory(struct Thing * t_eye)
}
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]++;