diff --git a/OpenRA.Game/Traits/Activities/TransformIntoActor.cs b/OpenRA.Game/Traits/Activities/TransformIntoActor.cs index 5f9b193a4a..be5df15845 100644 --- a/OpenRA.Game/Traits/Activities/TransformIntoActor.cs +++ b/OpenRA.Game/Traits/Activities/TransformIntoActor.cs @@ -54,7 +54,7 @@ namespace OpenRA.Traits.Activities self.Health = 0; self.World.Remove( self ); foreach (var s in sounds) - Sound.PlayToPlayer(self.Owner, s); + Sound.PlayToPlayer(self.Owner, s, self.CenterLocation); var a = self.World.CreateActor( actor, self.Location + offset, self.Owner ); a.Health = newHealth; diff --git a/OpenRA.Game/Traits/Activities/UndeployMcv.cs b/OpenRA.Game/Traits/Activities/UndeployMcv.cs index 8f9a7099de..ca8ec9e70f 100644 --- a/OpenRA.Game/Traits/Activities/UndeployMcv.cs +++ b/OpenRA.Game/Traits/Activities/UndeployMcv.cs @@ -45,7 +45,7 @@ namespace OpenRA.Traits.Activities () => self.World.AddFrameEndTask(w => DoUndeploy(w,self))); foreach (var s in self.Info.Traits.Get().SellSounds) - Sound.PlayToPlayer(self.Owner, s); + Sound.PlayToPlayer(self.Owner, s, self.CenterLocation); started = true; } diff --git a/OpenRA.Game/Traits/Player/PlaceBuilding.cs b/OpenRA.Game/Traits/Player/PlaceBuilding.cs index 85b8c81544..bb18b65ce1 100644 --- a/OpenRA.Game/Traits/Player/PlaceBuilding.cs +++ b/OpenRA.Game/Traits/Player/PlaceBuilding.cs @@ -51,7 +51,7 @@ namespace OpenRA.Traits var building = w.CreateActor( order.TargetString, t, order.Player ); if( playSounds ) foreach( var s in building.Info.Traits.Get().BuildSounds ) - Sound.PlayToPlayer( order.Player, s ); + Sound.PlayToPlayer( order.Player, s, self.CenterLocation ); playSounds = false; } } @@ -59,7 +59,7 @@ namespace OpenRA.Traits { var building = w.CreateActor( order.TargetString, order.TargetLocation, order.Player ); foreach (var s in building.Info.Traits.Get().BuildSounds) - Sound.PlayToPlayer(order.Player, s); + Sound.PlayToPlayer(order.Player, s, self.CenterLocation); } var facts = w.Queries.OwnedBy[self.Owner] diff --git a/OpenRA.Game/Traits/Render/RenderBuilding.cs b/OpenRA.Game/Traits/Render/RenderBuilding.cs index 9013aa4459..bc647bdb66 100644 --- a/OpenRA.Game/Traits/Render/RenderBuilding.cs +++ b/OpenRA.Game/Traits/Render/RenderBuilding.cs @@ -102,7 +102,7 @@ namespace OpenRA.Traits anim.PlayBackwardsThen( "make", null ); foreach (var s in self.Info.Traits.Get().SellSounds) - Sound.PlayToPlayer(self.Owner, s); + Sound.PlayToPlayer(self.Owner, s, self.CenterLocation); } public void Sold(Actor self) {}