Use Null-Propagation Operator
This commit is contained in:
@@ -96,17 +96,10 @@ namespace OpenRA.Mods.Common.Effects
|
||||
arrowSpeed *= -1;
|
||||
}
|
||||
|
||||
if (arrow != null)
|
||||
arrow.Tick();
|
||||
|
||||
if (beacon != null)
|
||||
beacon.Tick();
|
||||
|
||||
if (circles != null)
|
||||
circles.Tick();
|
||||
|
||||
if (clock != null)
|
||||
clock.Tick();
|
||||
arrow?.Tick();
|
||||
beacon?.Tick();
|
||||
circles?.Tick();
|
||||
clock?.Tick();
|
||||
|
||||
if (duration > 0 && duration <= tick++)
|
||||
owner.World.AddFrameEndTask(w => w.Remove(this));
|
||||
|
||||
@@ -48,18 +48,15 @@ namespace OpenRA.Mods.Common.Effects
|
||||
|
||||
void IEffect.Tick(World world)
|
||||
{
|
||||
if (flag != null)
|
||||
flag.Tick();
|
||||
flag?.Tick();
|
||||
|
||||
if (circles != null)
|
||||
circles.Tick();
|
||||
circles?.Tick();
|
||||
|
||||
if (cachedLocations == null || !cachedLocations.SequenceEqual(rp.Path))
|
||||
{
|
||||
UpdateTargetLineNodes(world);
|
||||
|
||||
if (circles != null)
|
||||
circles.Play(rp.Info.CirclesSequence);
|
||||
circles?.Play(rp.Info.CirclesSequence);
|
||||
}
|
||||
|
||||
if (!building.IsInWorld || building.IsDead)
|
||||
|
||||
Reference in New Issue
Block a user