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:
@@ -30,15 +30,15 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
[Desc("The width of the projectile.")]
|
||||
public readonly WDist Width = new WDist(1);
|
||||
|
||||
[Desc("Scan radius for actors with projectile-blocking trait. If set to zero (default), it will automatically scale",
|
||||
[Desc("Scan radius for actors with projectile-blocking trait. If set to a negative value (default), it will automatically scale",
|
||||
"to the blocker with the largest health shape. Only set custom values if you know what you're doing.")]
|
||||
public WDist BlockerScanRadius = WDist.Zero;
|
||||
public WDist BlockerScanRadius = new WDist(-1);
|
||||
|
||||
public IProjectile Create(ProjectileArgs args) { return new InstantHit(this, args); }
|
||||
|
||||
void IRulesetLoaded<WeaponInfo>.RulesetLoaded(Ruleset rules, WeaponInfo wi)
|
||||
{
|
||||
if (BlockerScanRadius == WDist.Zero)
|
||||
if (BlockerScanRadius < WDist.Zero)
|
||||
BlockerScanRadius = Util.MinimumRequiredBlockerScanRadius(rules);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user