mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
server: fix kill source for buff deaths without origin
This commit is contained in:
parent
06111612a3
commit
60538e0664
@ -190,8 +190,12 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, last_change: Healt
|
||||
get_attacker_name(KillType::Explosion, by)
|
||||
},
|
||||
(Some(DamageSource::Energy), Some(by)) => get_attacker_name(KillType::Energy, by),
|
||||
(Some(DamageSource::Buff(buff_kind)), Some(by)) => {
|
||||
get_attacker_name(KillType::Buff(buff_kind), by)
|
||||
(Some(DamageSource::Buff(buff_kind)), by) => {
|
||||
if let Some(by) = by {
|
||||
get_attacker_name(KillType::Buff(buff_kind), by)
|
||||
} else {
|
||||
KillSource::NonExistent(KillType::Buff(buff_kind))
|
||||
}
|
||||
},
|
||||
(Some(DamageSource::Other), Some(by)) => get_attacker_name(KillType::Other, by),
|
||||
(Some(DamageSource::Falling), _) => KillSource::FallDamage,
|
||||
|
Loading…
Reference in New Issue
Block a user