Integrated HitShapes

Integrated hit shapes with field loader and warhead calculations.
This commit is contained in:
Huw Pascoe
2015-10-29 16:58:07 +00:00
parent 5ef6d86f66
commit a8299221db
6 changed files with 40 additions and 15 deletions

View File

@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common
var actorWidth = 0;
var healthInfo = currActor.Info.TraitInfoOrDefault<HealthInfo>();
if (healthInfo != null)
actorWidth = healthInfo.Radius.Length;
actorWidth = healthInfo.Shape.OuterRadius.Length;
var projection = MinimumPointLineProjection(lineStart, lineEnd, currActor.CenterPosition);
var distance = (currActor.CenterPosition - projection).HorizontalLength;