minor tidy-up in CrateAction

This commit is contained in:
Chris Forbes
2010-09-05 16:07:35 +12:00
parent 7d912715bc
commit e371159826

View File

@@ -41,12 +41,10 @@ namespace OpenRA.Mods.RA
public virtual void Activate(Actor collector)
{
Sound.PlayToPlayer(collector.Owner, info.Notification);
collector.World.AddFrameEndTask(w =>
{
if (info.Effect != null)
w.Add(new CrateEffect(collector, info.Effect));
});
if (info.Effect != null)
collector.World.AddFrameEndTask(
w => w.Add(new CrateEffect(collector, info.Effect)));
}
}
}