mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'isse/agent-aggro-fix' into 'master'
Fix agent aggression when not recieving damage from attack Closes #1597 See merge request veloren/veloren!3473
This commit is contained in:
commit
4bcf7c7010
@ -198,6 +198,7 @@ pub fn get_attacker(entity: EcsEntity, read_data: &ReadData) -> Option<EcsEntity
|
||||
read_data
|
||||
.healths
|
||||
.get(entity)
|
||||
.filter(|health| health.last_change.amount < 0.0)
|
||||
.and_then(|health| health.last_change.damage_by())
|
||||
.and_then(|damage_contributor| get_entity_by_id(damage_contributor.uid().0, read_data))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user