//
  // Processing state
  //
  void TransportPad::StateProcess()
  {
    // Do we need to charge
    if (charge < 1.0F)
    {
      // Increment the progress counter
      charge += chargeRate * subject->GetEfficiency();
      
      // Are we done
      if (charge >= 1.0F)
      {
        // Close any open portal
        portalTimer.Reset();
      }
      else
      {
        ThinkFast();
      }
    }

    // Is the portal open
    if (portal.Alive())
    {
      // Has it expired
      if (portalTimer.Test())
      {
        RemovePortal();
      }

      // Process each cycle
      ThinkFast();
    }
  }
  //
  // Unload
  //
  // Unload at the given location
  //
  Bool TransportPad::Unload(const Vector &destination, Bool single)
  {
    // Ensure previous portal is deleted
    RemovePortal();

    // Get the portal type
    if (TransportObjType *p = subject->TransportType()->GetPortalType())
    {
      Vector closest;
   
      // Get the closest linked location
      if (p->FindLinkedPos(destination, closest))
      {
        // Create the portal
        portal = (TransportObj*)(&p->Spawn(closest));

        // Point it back
        portal->SetTelepadLink(subject);

        // Start the timer
        portalTimer.Start(subject->TransportType()->GetPortalTime());
      }
      else
      {
        return (FALSE);
      }
    }

    // Start processing each cycle
    ThinkFast();

    // Attempt to unload
    if (subject->Unload(destination, single))
    {
      // Clear the charge
      charge = 0.0F;

      // Success
      return (TRUE);
    }

    // No objects unloaded
    return (FALSE);
  }
 //
 // Perform task processing
 //
 Bool UnitRecycle::Process()
 {
   inst.Process(this);
   ThinkFast();
   return (quit);
 }
 //
 // Perform task processing
 //
 Bool UnitConstruct::Process()
 {
   inst.Process(this);  
   ThinkFast();
   return (quit);
 }