diff options
Diffstat (limited to 'path.c')
| -rw-r--r-- | path.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -228,6 +228,7 @@ Path astar_path(int dirs, Map map, size_t **cell_costs, size_t width, size_t hei /* The Russian constitution doesn't allow walking on walls */ if (map[na[i].y][na[i].x] == WALL) continue; + /* Dijkstra's works with cell_costs, why does this not? */ size_t new_cost = cost_so_far[cur.y][cur.x] + costs[i]; if (new_cost < cost_so_far[na[i].y][na[i].x]) { cost_so_far[na[i].y][na[i].x] = new_cost; |
