//
  // Handle notification
  //
  void Transport::Manager::Notify(Notification &notification)
  {
    // Is this one of our transports ?
    Transport *transport = active.Find(notification.from.DirectId());

    switch (notification.message)
    {
      case 0x61FC2088: // "Unit::MoveCompleted"
        if (transport)
        {
          // If this transport is assigned to a script then
          // tell that script the transport has completed its move
          if (transport->script)
          {
            transport->SetFlag();
            transport->script->Notify(0x998A995A); // "Transport::Moved"
          }
        }

      case 0x5CA4B1C1: // "Transport::Unloaded"
        if (transport)
        {
          // If this transport is assigned to a script then 
          // tell that script the transport is unloaded
          if (transport->script)
          {
            transport->SetFlag();
            transport->script->Notify(0x5CA4B1C1); // "Transport::Unloaded"
          }
        }
        break;

      case 0x11EAEF8E: // "Unit::Died"

        // A unit has died, check to see if its one of our transports
        if (transport)
        {
          // If this transport is assigned to a base then remove it

          // If this transport is assigned to a squad then
          // notify the squad that the transport has died

          if (transport->script)
          {
            transport->RemoveFromSquad(transport->script);
            transport->script->Notify(0x38601711); // "Transport::Died"
          }

        }
        break;
    }
  }
  //
  // Cleanup all transports
  //
  void Transport::Manager::CleanUp()
  {
    // Remove the transports from any scripts they are associated with
    NBinTree<Transport>::Iterator t(&active);
    Transport *transport;
    while ((transport = t++) != NULL)
    {
      if (transport->script)
      {
        transport->RemoveFromSquad(transport->script);
      }
    }

  }