From 3aa811bd2e9f72b35e1648ebdc085a0101bcf804 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Tue, 26 Apr 2016 18:02:08 +0200 Subject: [PATCH] Rename 'unit' to 'victim' in CEWH's GetDirectHit check --- OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs index ab60e4aa77..f7cb684c14 100644 --- a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs @@ -75,17 +75,17 @@ namespace OpenRA.Mods.Common.Warheads public bool GetDirectHit(World world, CPos cell, WPos pos, Actor firedBy, bool checkTargetType = false) { - foreach (var unit in world.FindActorsInCircle(pos, TargetSearchRadius)) + foreach (var victim in world.FindActorsInCircle(pos, TargetSearchRadius)) { - if (checkTargetType && !IsValidAgainst(unit, firedBy)) + if (checkTargetType && !IsValidAgainst(victim, firedBy)) continue; - var healthInfo = unit.Info.TraitInfoOrDefault(); + var healthInfo = victim.Info.TraitInfoOrDefault(); if (healthInfo == null) continue; // If the impact position is within any actor's HitShape, we have a direct hit - if (healthInfo.Shape.DistanceFromEdge(pos, unit).Length <= 0) + if (healthInfo.Shape.DistanceFromEdge(pos, victim).Length <= 0) return true; }