From: Christian Heller Date: Sun, 8 Mar 2015 16:08:56 +0000 (+0100) Subject: Server/C: Fix bug of ignoring wait set by get_dir_from_neighbors(). X-Git-Tag: tce~364 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/static/%7B%7Bprefix%7D%7D/day?a=commitdiff_plain;h=c7b477308d8db32911f3076169379f2932847ed9;p=plomrogue Server/C: Fix bug of ignoring wait set by get_dir_from_neighbors(). --- diff --git a/src/server/ai.c b/src/server/ai.c index 1a296ce..749a385 100644 --- a/src/server/ai.c +++ b/src/server/ai.c @@ -378,7 +378,7 @@ static uint8_t get_dir_to_nearest_target(struct Thing * t_eye, char filter) dijkstra_map(score_map, UINT16_MAX-1); dir_to_nearest_target = get_dir_from_neighbors(filter,t_eye,score_map); free(score_map); - if (dir_to_nearest_target) + if (dir_to_nearest_target && 1 != dir_to_nearest_target) { t_eye->command = get_thing_action_id_by_name(s[S_CMD_MOVE]); t_eye->arg = dir_to_nearest_target;