fix a rare crash in cnc docking
This commit is contained in:
@@ -156,7 +156,9 @@ namespace OpenRA.Traits
|
||||
}
|
||||
|
||||
public static DamageState GetDamageState(this Actor self)
|
||||
{
|
||||
{
|
||||
if (self.Destroyed) return DamageState.Dead;
|
||||
|
||||
var health = self.TraitOrDefault<Health>();
|
||||
return (health == null) ? DamageState.Undamaged : health.DamageState;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user