Remove Order.TargetLocation from support powers.
This commit is contained in:
@@ -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),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user