some more hax
This commit is contained in:
@@ -165,6 +165,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public static Target FromActor(Actor a) { return new Target { actor = a, valid = true }; }
|
||||
public static Target FromPos(float2 p) { return new Target { pos = p, valid = true }; }
|
||||
public static Target FromCell(int2 c) { return new Target { pos = Util.CenterOfCell(c), valid = true }; }
|
||||
public static Target FromOrder(Order o) { return o.TargetActor != null ? Target.FromActor(o.TargetActor) : Target.FromPos(o.TargetLocation); }
|
||||
|
||||
public static readonly Target None = new Target();
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Cnc.Effects
|
||||
public IonCannon(Actor firedBy, World world, int2 location)
|
||||
{
|
||||
this.firedBy = firedBy;
|
||||
target = Target.FromPos(OpenRA.Traits.Util.CenterOfCell(location));
|
||||
target = Target.FromCell(location);
|
||||
anim = new Animation("ionsfx");
|
||||
anim.PlayThen("idle", () => Finish(world));
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace OpenRA.Mods.RA
|
||||
if (mi.Button == MouseButton.Left) return null;
|
||||
if (self == underCursor) return null;
|
||||
|
||||
var target = underCursor == null ? Target.FromPos(Util.CenterOfCell(xy)) : Target.FromActor(underCursor);
|
||||
var target = underCursor == null ? Target.FromCell(xy) : Target.FromActor(underCursor);
|
||||
|
||||
var isHeal = self.GetPrimaryWeapon().Warheads.First().Damage < 0;
|
||||
var forceFire = mi.Modifiers.HasModifier(Modifiers.Ctrl);
|
||||
|
||||
Reference in New Issue
Block a user