home · contact · privacy
Server: Minor field of view code simplifications.
[plomrogue] / src / server / ai.c
index c6139287125f9881c1f0179b5e8b35225cfa4dda..0fd43ad2abffc6dc17189d699de3c0904b4bb551 100644 (file)
@@ -138,7 +138,8 @@ static char get_dir_to_nearest_enemy(struct Thing * t_origin)
     struct Thing * t = world.things;
     for (; t != NULL; t = t->next)
     {
-        if (!t->lifepoints || t == t_origin)
+        if (   !t->lifepoints || t == t_origin
+            || 'H' == t_origin->fov_map[t->pos.y * world.map.length + t->pos.x])
         {
             continue;
         }