Skip to content

Commit

Permalink
FireWarheads: play weapon report sound in Tick() not in FrameEndTask
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldgg2 committed Oct 7, 2023
1 parent 6c7940a commit bd215fc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions OpenRA.Mods.Common/Traits/FireWarheads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,8 @@ void ITick.Tick(Actor self)
foreach (var wep in Info.WeaponInfos)
{
wep.Impact(Target.FromPos(self.CenterPosition), self);
self.World.AddFrameEndTask(world =>
{
if (wep.Report != null && wep.Report.Length > 0)
Game.Sound.Play(SoundType.World, wep.Report, world, self.CenterPosition);
});
if (wep.Report != null && wep.Report.Length > 0)
Game.Sound.Play(SoundType.World, wep.Report, self.World, self.CenterPosition);
}
}
}
Expand Down

0 comments on commit bd215fc

Please sign in to comment.