/// <summary> /// Teleport agent to a landmark /// </summary> /// <param name="landmark"><seealso cref="UUID"/> of the landmark to teleport agent to</param> public void RequestTeleport(UUID landmark) { TeleportLandmarkRequestPacket p = new TeleportLandmarkRequestPacket(); p.Info = new TeleportLandmarkRequestPacket.InfoBlock(); p.Info.AgentID = Client.Self.AgentID; p.Info.SessionID = Client.Self.SessionID; p.Info.LandmarkID = landmark; Client.Network.SendPacket(p); }
/// <summary> /// Teleport agent to a landmark /// </summary> /// <param name="landmark"><seealso cref="UUID"/> of the landmark to teleport agent to</param> /// <returns>true on success, false on failure</returns> public bool Teleport(UUID landmark) { teleportStat = TeleportStatus.None; teleportEvent.Reset(); TeleportLandmarkRequestPacket p = new TeleportLandmarkRequestPacket(); p.Info = new TeleportLandmarkRequestPacket.InfoBlock(); p.Info.AgentID = Client.Self.AgentID; p.Info.SessionID = Client.Self.SessionID; p.Info.LandmarkID = landmark; Client.Network.SendPacket(p); teleportEvent.WaitOne(Client.Settings.TELEPORT_TIMEOUT, false); if (teleportStat == TeleportStatus.None || teleportStat == TeleportStatus.Start || teleportStat == TeleportStatus.Progress) { teleportMessage = "Teleport timed out."; teleportStat = TeleportStatus.Failed; } return (teleportStat == TeleportStatus.Finished); }