/// <summary> /// Default constructor /// </summary> public SecondLife() { // These are order-dependant Network = new NetworkManager(this); Settings = new Settings(this); Parcels = new ParcelManager(this); Self = new AgentManager(this); Avatars = new AvatarManager(this); Friends = new FriendsManager(this); Grid = new GridManager(this); Objects = new ObjectManager(this); Groups = new GroupManager(this); Assets = new AssetManager(this); Appearance = new AppearanceManager(this, Assets); Inventory = new InventoryManager(this); Directory = new DirectoryManager(this); Terrain = new TerrainManager(this); Sound = new SoundManager(this); Throttle = new AgentThrottle(this); }
/// <summary> /// Builds an AgentUpdate packet entirely from parameters. This /// will not touch the state of Self.Movement or /// Self.Movement.Camera in any way /// </summary> /// <param name="controlFlags"></param> /// <param name="position"></param> /// <param name="forwardAxis"></param> /// <param name="leftAxis"></param> /// <param name="upAxis"></param> /// <param name="bodyRotation"></param> /// <param name="headRotation"></param> /// <param name="farClip"></param> /// <param name="reliable"></param> /// <param name="flags"></param> /// <param name="state"></param> public void SendManualUpdate(AgentManager.ControlFlags controlFlags, LLVector3 position, LLVector3 forwardAxis, LLVector3 leftAxis, LLVector3 upAxis, LLQuaternion bodyRotation, LLQuaternion headRotation, float farClip, AgentFlags flags, AgentState state, bool reliable) { AgentUpdatePacket update = new AgentUpdatePacket(); update.AgentData.AgentID = Client.Self.AgentID; update.AgentData.SessionID = Client.Self.SessionID; update.AgentData.BodyRotation = bodyRotation; update.AgentData.HeadRotation = headRotation; update.AgentData.CameraCenter = position; update.AgentData.CameraAtAxis = forwardAxis; update.AgentData.CameraLeftAxis = leftAxis; update.AgentData.CameraUpAxis = upAxis; update.AgentData.Far = farClip; update.AgentData.ControlFlags = (uint)controlFlags; update.AgentData.Flags = (byte)flags; update.AgentData.State = (byte)state; update.Header.Reliable = reliable; Client.Network.SendPacket(update); }
private void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { if (status == AgentManager.TeleportStatus.Finished || status == AgentManager.TeleportStatus.Failed) teleporting = false; TeleportStatusEventArgs ea = new TeleportStatusEventArgs(message, status, flags); if (netcomSync != null) netcomSync.BeginInvoke(new OnTeleportStatusRaise(OnTeleportStatusChanged), new object[] { ea }); else OnTeleportStatusChanged(ea); }
void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { if (status == AgentManager.TeleportStatus.Finished) { this.avatars.Clear(); } }
public void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { Hashtable item = new Hashtable(); item.Add("MessageType", "Teleport"); item.Add("Status", status); item.Add("Flags", flags); if (status == AgentManager.TeleportStatus.Finished) { Client.Self.Movement.Camera.SetPositionOrientation(new LLVector3(128, 128, 0), 0, 0, 0); } enqueue(item); }
public TeleportStatusEventArgs(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { this.message = message; this.status = status; this.flags = flags; }
void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { switch (status) { case AgentManager.TeleportStatus.Finished: Appearance.SetPreviousAppearance(false); Self.Movement.AlwaysRun = true; break; } }
private void SetControlFlag(AgentManager.ControlFlags flag, bool value) { if (value) agentControls |= (uint)flag; else agentControls &= ~((uint)flag); }
private bool GetControlFlag(AgentManager.ControlFlags flag) { return (agentControls & (uint)flag) != 0; }