mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Actually check if entity is alive
This commit is contained in:
parent
7e97b9e495
commit
8106ac492a
@ -959,7 +959,10 @@ 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)
|
||||
&& ecs
|
||||
.read_component::<Health>()
|
||||
.get(entity)
|
||||
.map_or(true, |h| !h.is_dead)
|
||||
{
|
||||
buffs.insert(new_buff);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user