Validate the target before querying it's center position.

This commit is contained in:
Matthias Mailänder
2020-04-20 20:17:27 +02:00
committed by abcdefg30
parent 3603e6373d
commit 70babb4067

View File

@@ -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))