Don't cancel the FlyAttack activity if the activity has already been canceled. The Tick routine calls Cancel() on FlyAttack, which removes any NextActivity that may have been set by an outside listener. This is the case with a rare bug causing planes to be killed, removed from the playable game, but still existing in the game world.

This commit is contained in:
Kenny Hoxworth
2011-11-28 14:20:21 -05:00
committed by Chris Forbes
parent 0f97466a75
commit 98d4af18a4

View File

@@ -46,10 +46,13 @@ namespace OpenRA.Mods.RA.Air
public override void Cancel( Actor self )
{
if( inner != null )
inner.Cancel( self );
if( !IsCanceled )
{
if( inner != null )
inner.Cancel( self );
base.Cancel( self );
base.Cancel( self );
}
}
}
}