Fix Warhead.IsValidAgainst (FrozenActor.Owner null)

This commit is contained in:
rob-v
2019-01-10 14:36:41 +01:00
committed by Paul Chote
parent 7eff82c99b
commit 9ed2ffea91

View File

@@ -82,6 +82,9 @@ namespace OpenRA.Mods.Common.Warheads
/// <summary>Checks if the warhead is valid against (can do something to) the frozen actor.</summary>
public bool IsValidAgainst(FrozenActor victim, Actor firedBy)
{
if (!victim.IsValid)
return false;
// AffectsParent checks do not make sense for FrozenActors, so skip to stance checks
var stance = firedBy.Owner.Stances[victim.Owner];
if (!ValidStances.HasStance(stance))