Remove Order.TargetLocation from support powers.

This commit is contained in:
Paul Chote
2018-12-01 11:40:32 +00:00
parent 7d72aae5ba
commit 6dcd23e874
12 changed files with 26 additions and 25 deletions

View File

@@ -74,16 +74,16 @@ namespace OpenRA.Mods.Cnc.Traits
{
base.Activate(self, order, manager);
Activate(self, order.TargetLocation);
Activate(self, order.Target);
}
public void Activate(Actor self, CPos targetLocation)
public void Activate(Actor self, Target target)
{
self.World.AddFrameEndTask(w =>
{
PlayLaunchSounds();
Game.Sound.Play(SoundType.World, info.OnFireSound, self.World.Map.CenterOfCell(targetLocation));
w.Add(new IonCannon(self.Owner, info.WeaponInfo, w, self.CenterPosition, targetLocation,
Game.Sound.Play(SoundType.World, info.OnFireSound, target.CenterPosition);
w.Add(new IonCannon(self.Owner, info.WeaponInfo, w, self.CenterPosition, target,
info.Effect, info.EffectSequence, info.EffectPalette, info.WeaponDelay));
if (info.CameraActor == null)
@@ -91,7 +91,7 @@ namespace OpenRA.Mods.Cnc.Traits
var camera = w.CreateActor(info.CameraActor, new TypeDictionary
{
new LocationInit(targetLocation),
new LocationInit(self.World.Map.CellContaining(target.CenterPosition)),
new OwnerInit(self.Owner),
});