fix update enemy bug on short paths

This commit is contained in:
2026-06-26 18:38:06 -07:00
parent 1e74f5b054
commit 7e69113d37
+1 -1
View File
@@ -91,7 +91,7 @@ update_enemies :: proc(world: ^World, dt: f32) {
e := &world.enemies[i]
if !e.active do continue
if len(world.path) == 2 do return
if len(world.path) < 2 do return
if e.path_index >= len(world.path) {
world.base_health -= 1