summaryrefslogtreecommitdiff
path: root/src/resources/ground.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-09-22 15:36:58 +0200
committertroido <troido@protonmail.com>2020-09-22 15:36:58 +0200
commit37ad98cf725aa22f1c793b66102c99c9a76a4ec2 (patch)
treea1f35b025abb36b48c7646e84af76c05fcfac3cf /src/resources/ground.rs
parent33c1054d528efd896415baf08d4a52e1cdd7b801 (diff)
can base sprite on equipped items
Diffstat (limited to 'src/resources/ground.rs')
-rw-r--r--src/resources/ground.rs4
1 files changed, 2 insertions, 2 deletions
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<Visible>, ignore: &Entity) -> Vec<Entity> {
+ pub fn by_height(&self, pos: &Pos, visibles: &ReadStorage<Visible>) -> Vec<Entity> {
let mut entities: Vec<Entity> = 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()