Attack the center of the cell instead of the top left corner

to not discriminate bottom right directions. Fixes #2205
This commit is contained in:
Matthias Mailänder
2013-06-20 20:37:04 +02:00
parent 29c93182f1
commit ed8f6d9691

View File

@@ -212,7 +212,7 @@ namespace OpenRA.Mods.RA
{
var rsq = range * range * Game.CellSize * Game.CellSize;
foreach (var cell in target.Trait<ITargetable>().TargetableCells(target))
if ((attackOrigin - cell.ToPPos()).LengthSquared <= rsq)
if ((attackOrigin - Util.CenterOfCell(cell)).LengthSquared <= rsq)
return true;
return false;
}