rename RangeSquard to LengthSquared
This commit is contained in:
@@ -182,7 +182,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
var cell = world.Map.CellContaining(pos);
|
||||
|
||||
var shouldExplode = (pos.Z < 0) // Hit the ground
|
||||
|| (dist.LengthSquared < info.CloseEnough.RangeSquared) // Within range
|
||||
|| (dist.LengthSquared < info.CloseEnough.LengthSquared) // Within range
|
||||
|| (info.RangeLimit != 0 && ticks > info.RangeLimit) // Ran out of fuel
|
||||
|| (info.Blockable && world.ActorMap.GetUnitsAt(cell).Any(a => a.HasTrait<IBlocksProjectiles>())) // Hit a wall or other blocking obstacle
|
||||
|| !world.Map.Contains(cell) // This also avoids an IndexOutOfRangeException in GetTerrainInfo below.
|
||||
|
||||
Reference in New Issue
Block a user