Make resource warheads AirThreshold-aware

This commit is contained in:
reaperrr
2020-05-08 12:56:16 +02:00
committed by abcdefg30
parent 2b3d99fac2
commit 3eabc59921
2 changed files with 8 additions and 0 deletions

View File

@@ -45,6 +45,10 @@ namespace OpenRA.Mods.Common.Warheads
var firedBy = args.SourceActor;
var pos = target.CenterPosition;
var world = firedBy.World;
var dat = world.Map.DistanceAboveTerrain(pos);
if (dat > AirThreshold)
return;
var targetTile = world.Map.CellContaining(pos);
var minRange = (Size.Length > 1 && Size[1] > 0) ? Size[1] : 0;