File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
OpenRA.Mods.Common/Traits Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,10 @@ void INotifyDamage.Damaged(Actor self, AttackInfo e)
241241 if ( oat . TryGetAutoTargetOverride ( self , out _ ) )
242242 return ;
243243
244+ var owner = self . Owner ;
245+ if ( owner == null )
246+ return ;
247+
244248 if ( ! attacker . IsInWorld )
245249 {
246250 // If the aggressor is in a transport, then attack the transport instead
@@ -250,7 +254,7 @@ void INotifyDamage.Damaged(Actor self, AttackInfo e)
250254 }
251255
252256 // Don't fire at an invisible enemy when we can't move to reveal it
253- if ( ! AllowMove && ! attacker . CanBeViewedByPlayer ( self . Owner ) )
257+ if ( ! AllowMove && ! attacker . CanBeViewedByPlayer ( owner ) )
254258 return ;
255259
256260 // Not a lot we can do about things we can't hurt... although maybe we should automatically run away?
You can’t perform that action at this time.
0 commit comments