Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small FireWarheads tweaks #21096

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 3 additions & 6 deletions OpenRA.Mods.Common/Traits/FireWarheads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace OpenRA.Mods.Common.Traits
{
[Desc("Detonate defined warheads at the current location at a set interval.")]
public class FireWarheadsInfo : PausableConditionalTraitInfo, Requires<IMoveInfo>, IRulesetLoaded
public class FireWarheadsInfo : PausableConditionalTraitInfo, Requires<IOccupySpaceInfo>, IRulesetLoaded
{
[WeaponReference]
[FieldLoader.Require]
Expand Down 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