mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'UMR1352/fix#1223' into 'master'
Fix issue #1223: Check if entity is alive before applying a buff Closes #1223 See merge request veloren/veloren!2541
This commit is contained in:
commit
a8447fd62d
@ -959,6 +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
|
||||
.read_component::<Health>()
|
||||
.get(entity)
|
||||
.map_or(true, |h| !h.is_dead)
|
||||
{
|
||||
buffs.insert(new_buff);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user