summaryrefslogtreecommitdiff
path: root/src/systems/attacking.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/systems/attacking.rs')
-rw-r--r--src/systems/attacking.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systems/attacking.rs b/src/systems/attacking.rs
index 0fb5cf7..6535a75 100644
--- a/src/systems/attacking.rs
+++ b/src/systems/attacking.rs
@@ -18,13 +18,13 @@ impl <'a> System<'a> for Attacking {
WriteStorage<'a, Health>
);
fn run(&mut self, (mut victims, mut healths): Self::SystemData) {
-
for (health, attacked) in (&mut healths, &mut victims).join() {
for attack in attacked.attacks.drain(..) {
health.health -= attack.damage;
}
health.health = util::clamp(health.health, 0, health.maxhealth);
}
+ victims.clear();
}
}