allow invalid terrain targets for Air/Water bound weapons

made terrain targeting consistent with actors
This commit is contained in:
Matthias Mailänder
2014-01-03 13:18:53 +01:00
parent e3a2addca0
commit 3de1516747
14 changed files with 163 additions and 18 deletions

View File

@@ -179,6 +179,11 @@ namespace OpenRA.GameRules
if (!world.Map.IsInMap(cell))
return false;
var cellInfo = world.GetTerrainInfo(cell);
if (!ValidTargets.Intersect(cellInfo.TargetTypes).Any()
|| InvalidTargets.Intersect(cellInfo.TargetTypes).Any())
return false;
return true;
}