refactor map
This commit is contained in:
@@ -32,8 +32,8 @@ enemy_still_on_map :: proc(world: ^World, slot: int) -> (^Enemy, bool) {
|
||||
if slot < 0 || slot >= MAX_ENEMIES do return nil, false
|
||||
e := &world.combat.enemies[slot]
|
||||
if !e.active do return nil, false
|
||||
if len(world.path) == 0 do return nil, false
|
||||
if e.path_index >= len(world.path) do return nil, false
|
||||
if len(world.world_map.path) == 0 do return nil, false
|
||||
if e.path_index >= len(world.world_map.path) do return nil, false
|
||||
return e, true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user