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:
reaperrr
2017-06-23 21:13:58 +02:00
parent ca475fe133
commit 1d2361cdd3
7 changed files with 27 additions and 27 deletions

View File

@@ -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);
}
}