Avoid logically dead code.

This commit is contained in:
Matthias Mailänder
2016-04-17 14:00:29 +02:00
parent c2c26cbcdc
commit 12543f2f32

View File

@@ -58,9 +58,16 @@ namespace OpenRA.Mods.Common.Lint
if (bullet == null && missile == null && areabeam == null)
continue;
var targetExtraSearchRadius = bullet != null ? bullet.TargetExtraSearchRadius :
missile != null ? missile.TargetExtraSearchRadius :
areabeam != null ? areabeam.TargetExtraSearchRadius : WDist.Zero;
var targetExtraSearchRadius = WDist.Zero;
if (bullet != null)
targetExtraSearchRadius = bullet.TargetExtraSearchRadius;
if (missile != null)
targetExtraSearchRadius = missile.TargetExtraSearchRadius;
if (areabeam != null)
targetExtraSearchRadius = areabeam.TargetExtraSearchRadius;
if (healthTraits.Where(x => x.Shape.OuterRadius.Length > targetExtraSearchRadius.Length).Any())
emitError("Actor type `{0}` has a health radius exceeding the victim scan radius of the projectile on `{1}`!"