From ae41c1ba2ff803ec2e86d97883dddfd79d800103 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Wed, 15 Apr 2026 16:59:06 +0300 Subject: Disallow drawing walls on start/end --- map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'map.c') diff --git a/map.c b/map.c index a4974ac..143329c 100644 --- a/map.c +++ b/map.c @@ -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) { -- cgit v1.2.3