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

@@ -48,17 +48,15 @@ namespace OpenRA.Mods.Common.Traits
{
self.World.AddFrameEndTask(w =>
{
var location = self.World.Map.CenterOfCell(order.TargetLocation);
PlayLaunchSounds();
Game.Sound.Play(SoundType.World, info.DeploySound, location);
Game.Sound.Play(SoundType.World, info.DeploySound, order.Target.CenterPosition);
if (!string.IsNullOrEmpty(info.EffectSequence) && !string.IsNullOrEmpty(info.EffectPalette))
w.Add(new SpriteEffect(location, w, info.EffectImage, info.EffectSequence, info.EffectPalette));
w.Add(new SpriteEffect(order.Target.CenterPosition, w, info.EffectImage, info.EffectSequence, info.EffectPalette));
var actor = w.CreateActor(info.Actor, new TypeDictionary
{
new LocationInit(order.TargetLocation),
new LocationInit(self.World.Map.CellContaining(order.Target.CenterPosition)),
new OwnerInit(self.Owner),
});