From 37ad98cf725aa22f1c793b66102c99c9a76a4ec2 Mon Sep 17 00:00:00 2001 From: troido Date: Tue, 22 Sep 2020 15:36:58 +0200 Subject: can base sprite on equipped items --- src/resources/ground.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/resources/ground.rs') diff --git a/src/resources/ground.rs b/src/resources/ground.rs index 7868be9..46473b8 100644 --- a/src/resources/ground.rs +++ b/src/resources/ground.rs @@ -57,12 +57,12 @@ impl Ground { nearby_components } - pub fn by_height(&self, pos: &Pos, visibles: &ReadStorage, ignore: &Entity) -> Vec { + pub fn by_height(&self, pos: &Pos, visibles: &ReadStorage) -> Vec { let mut entities: Vec = self.cells .get(&pos).unwrap_or(&HashSet::new()) .iter() .cloned() - .filter(|e| e != ignore && visibles.contains(*e)) + .filter(|e| visibles.contains(*e)) .collect(); entities.sort_by(|a, b| visibles.get(*b).unwrap().height.partial_cmp(&visibles.get(*a).unwrap().height).unwrap() -- cgit