fix crash on selecting husks (and other things with Unit but Selectable.Voice = null)
This commit is contained in:
@@ -222,5 +222,10 @@ namespace OpenRA
|
||||
|
||||
return "{0:D2}:{1:D2}".F(minutes, seconds % 60);
|
||||
}
|
||||
|
||||
public static bool HasVoice(this Actor a)
|
||||
{
|
||||
return a.Info.Traits.Contains<SelectableInfo>() && a.Info.Traits.Get<SelectableInfo>().Voice != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user