Fix a clippy warning, complete section 5.6
This commit is contained in:
parent
b5bf24a3aa
commit
3c36ee7fd3
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user