Merge two ifs in RevealOnDeath

This commit is contained in:
reaperrr
2018-09-20 16:35:08 +02:00
committed by Paul Chote
parent ade85f8977
commit 83cd7cf485

View File

@@ -51,10 +51,7 @@ namespace OpenRA.Mods.Common.Traits
void INotifyKilled.Killed(Actor self, AttackInfo attack) void INotifyKilled.Killed(Actor self, AttackInfo attack)
{ {
if (IsTraitDisabled) if (IsTraitDisabled || !self.IsInWorld)
return;
if (!self.IsInWorld)
return; return;
if (!info.DeathTypes.IsEmpty && !attack.Damage.DamageTypes.Overlaps(info.DeathTypes)) if (!info.DeathTypes.IsEmpty && !attack.Damage.DamageTypes.Overlaps(info.DeathTypes))