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: Minor field of view code simplifications.
[plomrogue]
/
src
/
server
/
ai.c
diff --git
a/src/server/ai.c
b/src/server/ai.c
index c6139287125f9881c1f0179b5e8b35225cfa4dda..0fd43ad2abffc6dc17189d699de3c0904b4bb551 100644
(file)
--- a/
src/server/ai.c
+++ b/
src/server/ai.c
@@
-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;
}