Change default and auto-calc of victim scans to -1
For all projectiles and warheads. Not really a must for everything else, but for CreateEffectWarhead, the ImpactTypes refactor (separate PR) makes it a bit harder to make the warhead valid in every situation, so setting the victim scan to zero is the easiest way to disable scanning for actors completely.
This commit is contained in:
@@ -41,13 +41,13 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
[Desc("What impact types should this effect NOT apply to.", "Overrides ValidImpactTypes.")]
|
||||
public readonly ImpactType InvalidImpactTypes = ImpactType.None;
|
||||
|
||||
[Desc("Scan radius for victims around impact. If set to zero (default), it will automatically scale to the largest health shape.",
|
||||
[Desc("Scan radius for victims around impact. If set to a negative value (default), it will automatically scale to the largest health shape.",
|
||||
"Custom overrides should not be necessary under normal circumstances.")]
|
||||
public WDist VictimScanRadius = WDist.Zero;
|
||||
public WDist VictimScanRadius = new WDist(-1);
|
||||
|
||||
void IRulesetLoaded<WeaponInfo>.RulesetLoaded(Ruleset rules, WeaponInfo info)
|
||||
{
|
||||
if (VictimScanRadius == WDist.Zero)
|
||||
if (VictimScanRadius < WDist.Zero)
|
||||
VictimScanRadius = Util.MinimumRequiredVictimScanRadius(rules);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
[Desc("Ranges at which each Falloff step is defined. Overrides Spread.")]
|
||||
public WDist[] Range = null;
|
||||
|
||||
[Desc("Extra search radius beyond maximum spread. If set to zero (default), it will automatically scale to the largest health shape.",
|
||||
[Desc("Extra search radius beyond maximum spread. If set to a negative value (default), it will automatically scale to the largest health shape.",
|
||||
"Custom overrides should not be necessary under normal circumstances.")]
|
||||
public WDist VictimScanRadius = WDist.Zero;
|
||||
public WDist VictimScanRadius = new WDist(-1);
|
||||
|
||||
void IRulesetLoaded<WeaponInfo>.RulesetLoaded(Ruleset rules, WeaponInfo info)
|
||||
{
|
||||
if (VictimScanRadius == WDist.Zero)
|
||||
if (VictimScanRadius < WDist.Zero)
|
||||
VictimScanRadius = Util.MinimumRequiredVictimScanRadius(rules);
|
||||
|
||||
if (Range != null)
|
||||
|
||||
Reference in New Issue
Block a user