//-------------------------------------------------------------------
//
//  This code is copyright 2001 by G5 Software.
//  Any unauthorized usage, either in part or in whole of this code
//  is strictly prohibited. Violators WILL be prosecuted to the
//  maximum extent allowed by law.
//
//-------------------------------------------------------------------

class CNavPoint
{
  void CNavPoint()
  {
    CreateComponent("nav", "NavPoint", "CNavPointScriptHost");
    SetCompoundObjectPositionable("nav");

    Core_AddClassificator("NavPoint");   // for cockpit identification
  }
}

class CNavPointScriptHost
{
  void CNavPointScriptHost()
  {
    SetRadius( 20.f); // default navpoint radius
  }

  void OnSetCustomParameter( string _param)
  {
    if ( _param != "")
    {
      SetRadius( Core_String2Float( _param));
    }
  }
}

class CNavPointUser
{
  vector GetNavPoint( string _Name)
  {
    return Core_CallFunction( "AIController", "GetNavPointByName", _Name);
  }

  float GetNavPointRadius( string _Name)
  {
    return Core_CallFunction( "AIController", "GetNavPointRadiusByName", _Name);
  }
}
