Пример #1
0
        public override bool Excecute(Automaton am, GridClient client, bool force)
        {
            if (!client.Network.Connected)
            {
                result.message = "Not Connected to grid"; return(true);
            }
            if (local)
            {
                OpenMetaverse.Vector3 pos = client.Self.SimPosition;
                x += pos.X;
                y += pos.Y;
                z += pos.Z;
            }
            uint regionX, regionY;

            Utils.LongToUInts(client.Network.CurrentSim.Handle, out regionX, out regionY);
            x += (double)regionX;
            y += (double)regionY;
            if (range <= 0)
            {
                range = 2;
            }
            am.AutoPilot(new Vector3d(x, y, z), range);
            result.success = true;
            return(true);
        }