pathfinding with bfs

This commit is contained in:
2026-07-04 18:01:22 -07:00
parent 6697ba70bf
commit ca2ea3397d
5 changed files with 154 additions and 17 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ game_handle_input :: proc(g: ^Game) {
wx, wy := screen_to_world(&g.camera, mx, my)
tx, ty := world_to_tile(wx, wy)
if tile_in_bounds(&g.tilemap, tx, ty) {
entity_set_move_target(&g.world.entities, g.player_colonist, {tx, ty})
entity_set_move_target(&g.world.entities, g.player_colonist, &g.tilemap, {tx, ty})
g.selection.active = true
g.selection.tile = {tx, ty}
}