Zombie prevention
This commit is contained in:
@@ -59,8 +59,9 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
return inRange
|
||||
.Where(a => a != self && self.Owner.Stances[ a.Owner ] == Stance.Ally)
|
||||
.Where(a => Combat.HasAnyValidWeapons(self, Target.FromActor(a)))
|
||||
.Where(a => !a.IsDead())
|
||||
.Where(a => a.traits.Contains<Health>() && a.GetExtendedDamageState() < ExtendedDamageState.Undamaged)
|
||||
.Where(a => Combat.HasAnyValidWeapons(self, Target.FromActor(a)))
|
||||
.OrderBy(a => (a.Location - self.Location).LengthSquared)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (self.IsDead())
|
||||
return;
|
||||
|
||||
var info = self.Info.Traits.Get<SelfHealingInfo>();
|
||||
if (self.traits.Get<Health>().HPFraction >= info.HealIfBelow)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user