fix update enemy bug on short paths
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user