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