home · contact · privacy
Add auto-mapping / map memory.
[plomrogue] / src / server / ai.c
index b761c6bbbc8039fd2ba75908228f3b006ed9bc8a..5be48f3b7e00939ce19c2bbd5c2547dcaf68f91c 100644 (file)
@@ -5,7 +5,6 @@
 #include <stdint.h> /* uint8_t, uint16_t, uint32_t, UINT16_MAX */
 #include <stdlib.h> /* free() */
 #include "../common/try_malloc.h" /* try_malloc() */
-#include "field_of_view.h" /* VISIBLE */
 #include "hardcoded_strings.h" /* s */
 #include "thing_actions.h" /* get_thing_action_id_by_name() */
 #include "things.h" /* struct Thing */
@@ -133,7 +132,7 @@ static char get_dir_to_nearest_enemy(struct Thing * t_origin)
     for (i = 0; i < map_size; i++)
     {
         score_map[i] = UINT16_MAX;
-        if (t_origin->fov_map[i] & VISIBLE && world.map.cells[i] == '.')
+        if ('.' == t_origin->mem_map[i])
         {
             score_map[i] = max_score;
         }