FireWarheads: play weapon report sound in Tick() not in FrameEndTask
This commit is contained in:
@@ -72,11 +72,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user