aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'map.c')
-rw-r--r--map.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/map.c b/map.c
index 28a87ea..a5e528c 100644
--- a/map.c
+++ b/map.c
@@ -727,8 +727,9 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi
break;
case KEYBINDING_ALGO:
- if (path_func == astar_path) { set_message("Dijkstra's"); path_func = &dijkstra_path; }
- else { set_message("A*"); path_func = &astar_path; };
+ if (path_func == astar_path) { path_func_string = DIJKSTRA_STRING; path_func = &dijkstra_path; }
+ else { path_func_string = ASTAR_STRING; path_func = &astar_path; };
+ set_message("%s", path_func_string);
path_free(path, *height);
if (should_pathfind) path = path_func(dirs, *map, NULL, *width, *height, *start, *goal, visited, 0);
@@ -769,7 +770,7 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi
break;
case KEYBINDING_PATH_TIME:
- set_message("%f seconds", path_time); print_message(*height);
+ set_message("%f seconds (%s)", path_time, path_func_string); print_message(*height);
break;
case KEYBINDING_SAVE_MAP: