1
0
Fork 0

Fix a clippy warning, complete section 5.6

This commit is contained in:
Timothy Warren 2022-01-03 10:58:20 -05:00
parent b5bf24a3aa
commit 3c36ee7fd3
1 changed files with 10 additions and 12 deletions

View File

@ -58,18 +58,16 @@ pub fn try_move_player(delta_x: i32, delta_y: i32, ecs: &mut World) {
let mut ppos = ecs.write_resource::<Point>();
ppos.x = pos.x;
ppos.y = pos.y
} else {
if combat_stats.get(*potential_target).is_some() {
wants_to_melee
.insert(
entity,
WantsToMelee {
target: *potential_target,
},
)
.expect("Add target failed");
return;
}
} else if combat_stats.get(*potential_target).is_some() {
wants_to_melee
.insert(
entity,
WantsToMelee {
target: *potential_target,
},
)
.expect("Add target failed");
return;
}
if let Some(door) = doors.get_mut(*potential_target) {