From d93a3a61ee8597482b0e4d7fabc3d6f12adce58b Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 1 Jan 2016 15:45:18 +0100 Subject: [PATCH] Use DistanceFromEdge instead of OuterRadius for CreateEffectWarhead's hit check --- OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs index d42fefe38c..e79d54322a 100644 --- a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs @@ -77,8 +77,8 @@ namespace OpenRA.Mods.Common.Warheads if (healthInfo == null) continue; - // If the impact position is within any actor's health radius, we have a direct hit - if ((unit.CenterPosition - pos).LengthSquared <= healthInfo.Shape.OuterRadius.LengthSquared) + // If the impact position is within any actor's HitShape, we have a direct hit + if ((unit.CenterPosition - pos).LengthSquared <= healthInfo.Shape.DistanceFromEdge(pos, unit).LengthSquared) return true; }