wtf; MEDI was really borked
This commit is contained in:
@@ -142,7 +142,9 @@ namespace OpenRa.Game.Traits
|
|||||||
{
|
{
|
||||||
if (mi.Button == MouseButton.Left || underCursor == null) return null;
|
if (mi.Button == MouseButton.Left || underCursor == null) return null;
|
||||||
if (self == underCursor) return null;
|
if (self == underCursor) return null;
|
||||||
if (underCursor.Owner == self.Owner && !mi.Modifiers.HasModifier( Modifiers.Ctrl )) return null;
|
var isHeal = Rules.WeaponInfo[self.Info.Primary].Damage < 0;
|
||||||
|
if (((underCursor.Owner == self.Owner) ^ isHeal)
|
||||||
|
&& !mi.Modifiers.HasModifier( Modifiers.Ctrl )) return null;
|
||||||
if (!Combat.HasAnyValidWeapons(self, underCursor)) return null;
|
if (!Combat.HasAnyValidWeapons(self, underCursor)) return null;
|
||||||
return new Order("Attack", self, underCursor, int2.Zero, null);
|
return new Order("Attack", self, underCursor, int2.Zero, null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace OpenRa.Game.Traits
|
|||||||
var inRange = Game.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range);
|
var inRange = Game.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range);
|
||||||
|
|
||||||
return inRange
|
return inRange
|
||||||
.Where(a => a.Owner == self.Owner) /* todo: one day deal with friendly players */
|
.Where(a => a.Owner == self.Owner && a != self) /* todo: one day deal with friendly players */
|
||||||
.Where(a => Combat.HasAnyValidWeapons(self, a))
|
.Where(a => Combat.HasAnyValidWeapons(self, a))
|
||||||
.Where(a => a.Health < a.Info.Strength)
|
.Where(a => a.Health < a.Info.Strength)
|
||||||
.OrderBy(a => (a.Location - self.Location).LengthSquared)
|
.OrderBy(a => (a.Location - self.Location).LengthSquared)
|
||||||
|
|||||||
@@ -590,7 +590,7 @@ LongDesc=Elite commando infantry, armed with \ndual pistols and C4.\n Strong vs
|
|||||||
[MEDI]
|
[MEDI]
|
||||||
Description=Medic
|
Description=Medic
|
||||||
Voice=MedicVoice
|
Voice=MedicVoice
|
||||||
Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoHeal
|
Traits=Unit, Mobile, RenderInfantry, AutoHeal, AttackBase, TakeCover, SquishByTank
|
||||||
LongDesc=Heals nearby infantry.\n Strong vs Nothing\n Weak vs Everything
|
LongDesc=Heals nearby infantry.\n Strong vs Nothing\n Weak vs Everything
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user