diff --git a/OpenRA.Mods.Gen/Traits/Warheads/AttachDelayedWeaponWarhead.cs b/OpenRA.Mods.Gen/Traits/Warheads/AttachDelayedWeaponWarhead.cs index 652ac0c4c28a..2cf5e53aa758 100644 --- a/OpenRA.Mods.Gen/Traits/Warheads/AttachDelayedWeaponWarhead.cs +++ b/OpenRA.Mods.Gen/Traits/Warheads/AttachDelayedWeaponWarhead.cs @@ -50,7 +50,7 @@ public override void DoImpact(Target target, Actor firedBy, IEnumerable dam if (!IsValidImpact(pos, firedBy)) return; - var availableActors = firedBy.World.FindActorsInCircle(pos, Range + VictimScanRadius); + var availableActors = firedBy.World.FindActorsInCircle(pos, Range); foreach (var actor in availableActors) { if (!IsValidAgainst(actor, firedBy)) diff --git a/OpenRA.Mods.Gen/Traits/Warheads/CaptureActorWarhead.cs b/OpenRA.Mods.Gen/Traits/Warheads/CaptureActorWarhead.cs index 086be628cb7c..cc98540c9ff5 100644 --- a/OpenRA.Mods.Gen/Traits/Warheads/CaptureActorWarhead.cs +++ b/OpenRA.Mods.Gen/Traits/Warheads/CaptureActorWarhead.cs @@ -46,7 +46,7 @@ public override void DoImpact(Target target, Actor firedBy, IEnumerable dam if (!IsValidImpact(pos, firedBy)) return; - var availableActors = firedBy.World.FindActorsInCircle(pos, Range + VictimScanRadius); + var availableActors = firedBy.World.FindActorsInCircle(pos, Range); foreach (var a in availableActors) { diff --git a/OpenRA.Mods.Gen/Traits/Warheads/DetachDelayedWeaponWarhead.cs b/OpenRA.Mods.Gen/Traits/Warheads/DetachDelayedWeaponWarhead.cs index 87ed5b4576ac..59ade7a3554e 100644 --- a/OpenRA.Mods.Gen/Traits/Warheads/DetachDelayedWeaponWarhead.cs +++ b/OpenRA.Mods.Gen/Traits/Warheads/DetachDelayedWeaponWarhead.cs @@ -35,7 +35,7 @@ public override void DoImpact(Target target, Actor firedBy, IEnumerable dam if (!IsValidImpact(pos, firedBy)) return; - var availableActors = firedBy.World.FindActorsInCircle(pos, Range + VictimScanRadius); + var availableActors = firedBy.World.FindActorsInCircle(pos, Range); foreach (var actor in availableActors) { if (!IsValidAgainst(actor, firedBy)) diff --git a/OpenRA.Mods.Gen/Traits/Warheads/WarheadAS.cs b/OpenRA.Mods.Gen/Traits/Warheads/WarheadAS.cs index 08f1f46488e6..b723181baf06 100644 --- a/OpenRA.Mods.Gen/Traits/Warheads/WarheadAS.cs +++ b/OpenRA.Mods.Gen/Traits/Warheads/WarheadAS.cs @@ -20,11 +20,10 @@ namespace OpenRA.Mods.Yupgi_alert.Warheads { [Desc("AS warhead extension class." + "These warheads check for the Air TargetType when detonated inair!")] - public abstract class WarheadAS : Warhead, IRulesetLoaded + public abstract class WarheadAS : Warhead { - [Desc("Extra search radius beyond maximum spread. If set to zero (default), it will automatically scale to the largest health shape.", - "Custom overrides should not be necessary under normal circumstances.")] - public WDist VictimScanRadius = WDist.Zero; + [Desc("Whether to consider actors in determining whether the explosion should happen. If false, only terrain will be considered.")] + public readonly bool ImpactActors = true; public ImpactType GetImpactType(World world, CPos cell, WPos pos, Actor firedBy) { @@ -47,7 +46,7 @@ public ImpactType GetImpactType(World world, CPos cell, WPos pos, Actor firedBy) public bool GetDirectHit(World world, CPos cell, WPos pos, Actor firedBy, bool checkTargetType = false) { - foreach (var victim in world.FindActorsInCircle(pos, VictimScanRadius)) + foreach (var victim in world.FindActorsInCircle(pos, WDist.Zero)) { if (checkTargetType && !IsValidAgainst(victim, firedBy)) continue; @@ -90,11 +89,5 @@ public bool IsValidImpact(WPos pos, Actor firedBy) return validImpact; } - - void IRulesetLoaded.RulesetLoaded(Ruleset rules, WeaponInfo info) - { - if (VictimScanRadius == WDist.Zero) - VictimScanRadius = Util.MinimumRequiredVictimScanRadius(rules); - } } }