mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Check if entity is alive before applying a buff
This commit is contained in:
parent
3ee123b745
commit
7e97b9e495
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user