Use null propagation
This commit is contained in:
@@ -37,11 +37,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
if (self.World.Map.DistanceAboveTerrain(self.CenterPosition).Length <= 0)
|
||||
{
|
||||
if (info.ExplosionWeapon != null)
|
||||
{
|
||||
// Use .FromPos since this actor is killed. Cannot use Target.FromActor
|
||||
info.ExplosionWeapon.Impact(Target.FromPos(self.CenterPosition), self);
|
||||
}
|
||||
// Use .FromPos since this actor is killed. Cannot use Target.FromActor
|
||||
info.ExplosionWeapon?.Impact(Target.FromPos(self.CenterPosition), self);
|
||||
|
||||
self.Kill(self);
|
||||
Cancel(self);
|
||||
|
||||
@@ -74,8 +74,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
if (enterLegacyHut != null)
|
||||
enterLegacyHut.Repair(self);
|
||||
else if (enterHut != null)
|
||||
enterHut.Repair(self);
|
||||
else
|
||||
enterHut?.Repair(self);
|
||||
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", speechNotification, self.Owner.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(textNotification, self.Owner);
|
||||
|
||||
Reference in New Issue
Block a user