From 7e97b9e49527b1f94429b786c5f71b45bfaa4454 Mon Sep 17 00:00:00 2001 From: Enrico Marconi Date: Fri, 2 Jul 2021 14:01:20 +0200 Subject: [PATCH] Check if entity is alive before applying a buff --- server/src/events/entity_manipulation.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 47b28d7e39..eabde86f76 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -959,6 +959,7 @@ pub fn handle_buff(server: &mut Server, entity: EcsEntity, buff_change: buff::Bu if !bodies .get(entity) .map_or(false, |body| body.immune_to(new_buff.kind)) + && ecs.is_alive(entity) { buffs.insert(new_buff); }