Merge two ifs into one in SpawnActorOnDeath

This commit is contained in:
reaperrr
2020-05-28 00:46:13 +02:00
committed by Paul Chote
parent 6d0fbfa21f
commit 84246d287d
2 changed files with 6 additions and 13 deletions

View File

@@ -77,10 +77,7 @@ namespace OpenRA.Mods.Common.Traits
void INotifyKilled.Killed(Actor self, AttackInfo e)
{
if (!enabled || IsTraitDisabled)
return;
if (!self.IsInWorld)
if (!enabled || IsTraitDisabled || !self.IsInWorld)
return;
if (self.World.SharedRandom.Next(100) > Info.Probability)