Remove unused did_something
This commit is contained in:
parent
62d8e1de73
commit
f0ba6d94b9
@ -65,7 +65,6 @@ pub fn player_input(
|
||||
.find_map(|(entity, pos)| Some((*entity, *pos + delta)))
|
||||
.unwrap();
|
||||
|
||||
let mut did_something = false;
|
||||
if delta.x != 0 || delta.y != 0 {
|
||||
let mut hit_something = false;
|
||||
let mut enemies = <(Entity, &Point)>::query().filter(component::<Enemy>());
|
||||
@ -74,7 +73,6 @@ pub fn player_input(
|
||||
.filter(|(_, pos)| **pos == destination)
|
||||
.for_each(|(entity, _)| {
|
||||
hit_something = true;
|
||||
did_something = true;
|
||||
|
||||
commands.push((
|
||||
(),
|
||||
@ -86,7 +84,6 @@ pub fn player_input(
|
||||
});
|
||||
|
||||
if !hit_something {
|
||||
did_something = true;
|
||||
commands.push((
|
||||
(),
|
||||
WantsToMove {
|
||||
|
Loading…
Reference in New Issue
Block a user