home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add "look" mode to query things on any cell via new THINGS_HERE command.
[plomrogue]
/
src
/
server
/
ai.c
diff --git
a/src/server/ai.c
b/src/server/ai.c
index ba93f4c9f0aa4d32775c5c093f6744f644dcc19b..dd11f38deab002a4694d84f649ba4fe348dbf8be 100644
(file)
--- a/
src/server/ai.c
+++ b/
src/server/ai.c
@@
-195,7
+195,7
@@
static void init_score_map(char filter, uint16_t * score_map, uint32_t map_size,
static uint8_t get_dir_to_nearest_thing(struct Thing * t_eye, char filter)
{
static uint8_t get_dir_to_nearest_thing(struct Thing * t_eye, char filter)
{
- char dir_to_nearest_
enemy
= 0;
+ char dir_to_nearest_
thing
= 0;
if (seeing_thing(t_eye, filter))
{
uint32_t map_size = world.map.length * world.map.length;
if (seeing_thing(t_eye, filter))
{
uint32_t map_size = world.map.length * world.map.length;
@@
-214,14
+214,14
@@
static uint8_t get_dir_to_nearest_thing(struct Thing * t_eye, char filter)
if (min_neighbor > neighbors[i])
{
min_neighbor = neighbors[i];
if (min_neighbor > neighbors[i])
{
min_neighbor = neighbors[i];
- dir_to_nearest_
enemy
= dirs[i];
+ dir_to_nearest_
thing
= dirs[i];
}
}
}
}
}
}
- if (dir_to_nearest_
enemy
)
+ if (dir_to_nearest_
thing
)
{
t_eye->command = get_thing_action_id_by_name(s[S_CMD_MOVE]);
{
t_eye->command = get_thing_action_id_by_name(s[S_CMD_MOVE]);
- t_eye->arg = dir_to_nearest_
enemy
;
+ t_eye->arg = dir_to_nearest_
thing
;
return 1;
}
return 0;
return 1;
}
return 0;