Skip to content

Commit

Permalink
Update basic_combat.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
InfinityDevTech authored Oct 7, 2024
1 parent 4d1ba2a commit 6d76bd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ai_scripts/basic_combat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ fn move_and_attack_units(game_state: &GameState, player_state: &mut PlayerState)
.map(|(u, t, _)| HEX_LAYOUT.world_pos_to_hex(t.translation.truncate()))
.collect::<HashSet<Hex>>();

for (unit, unit_transform, entity) in &game_state.units {
for unit in &game_state.units {
let (unit, unit_transform, entity) = unit;
if unit.owner_id != player_state.owner_id {
continue;
}
Expand Down

0 comments on commit 6d76bd6

Please sign in to comment.