Validate the target before querying it's center position.
This commit is contained in:
committed by
abcdefg30
parent
3603e6373d
commit
70babb4067
@@ -35,6 +35,9 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
public override void DoImpact(Target target, WarheadArgs args)
|
||||
{
|
||||
var firedBy = args.SourceActor;
|
||||
if (!target.IsValidFor(firedBy))
|
||||
return;
|
||||
|
||||
var world = firedBy.World;
|
||||
|
||||
if (Chance < world.LocalRandom.Next(100))
|
||||
|
||||
Reference in New Issue
Block a user