Add turret-linking support to HitShape
Allows to link a HitShape to the position and facing of a turret.
This commit is contained in:
@@ -295,7 +295,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
|
||||
// If the impact position is within any actor's HitShape, we have a direct hit
|
||||
var activeShapes = victim.TraitsImplementing<HitShape>().Where(Exts.IsTraitEnabled);
|
||||
if (activeShapes.Any(i => i.Info.Type.DistanceFromEdge(pos, victim).Length <= 0))
|
||||
if (activeShapes.Any(i => i.DistanceFromEdge(victim, pos).Length <= 0))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user