View Single Post
  #1  
Old 04-30-2011, 12:58 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Just to have it all in one thread

Quote:
Originally Posted by MuxaHuk View Post
Code:
public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
    {
        base.OnPlaceLeave(player, actor, placeIndex);
        Timeout(1, () =>
        {
            AiAircraft CurAircraft = player.Place() as AiAircraft;
            AiAircraft PrevAircraft = actor as AiAircraft;
            if (CurAircraft != PrevAircraft)   
                { (actor as AiAircraft).Destroy(); }
        });
    }
Reply With Quote