diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-15 16:59:06 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-15 16:59:06 +0300 |
| commit | ae41c1ba2ff803ec2e86d97883dddfd79d800103 (patch) | |
| tree | e817fe247f700b63fe4ee22c75597fecdbfb5819 /map.c | |
| parent | 236eee73566c62e601db674c053c33aa3f41b31b (diff) | |
| download | astar-ae41c1ba2ff803ec2e86d97883dddfd79d800103.tar.xz | |
Disallow drawing walls on start/end
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -661,7 +661,7 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi if (m1down) { size_t row = event.y - map_offset_y, col = (event.x - map_offset_x) / 2; - if (row < *height && col < *width) { + if (!((row == start->y && col == start->x) || (row == goal->y && col == goal->x)) && row < *height && col < *width) { (*map)[row][col] = cur; path_free(path, *height); if (should_pathfind) { |
