Projectile effects are now drained, so that the same projectile can't trigger it's effects on multiple enemies.

This commit is contained in:
Sam 2020-09-15 20:06:45 -05:00
parent 67eafdabd0
commit 3e2e06f2f8
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
Item(
ItemDef(
name: "Naturalist Walking Stick",
description: "Heals your allies with the power of nature.",
kind: Tool(

View File

@ -75,7 +75,7 @@ impl<'a> System<'a> for Sys {
continue;
}
for effect in projectile.hit_entity.iter().cloned() {
for effect in projectile.hit_entity.drain(..) {
match effect {
projectile::Effect::Damage(healthchange) => {
let owner_uid = projectile.owner.unwrap();