public void StartTrace(TraceSession parent, OpenMetaverse.AgentManager avatarManager) { mGridClient = parent.Client; mAgentManager = avatarManager; mLastUpdate = DateTime.Now; }
/// <summary> /// Default constructor /// </summary> public GridClient() { // 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); //if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore = new Inventory(Inventory); //if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore = new Inventory(Inventory); //Inventory.OnSkeletonsReceived += // delegate(InventoryManager manager) // { // if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore.InitializeFromSkeleton(Inventory.InventorySkeleton); // if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore.InitializeFromSkeleton(Inventory.LibrarySkeleton); // }; }
/// <summary> /// Default constructor /// </summary> public GridClient() { // Initialise SmartThreadPool when using mono if (Type.GetType("Mono.Runtime") != null) { WorkPool.Init(true); } // These are order-dependant Network = new NetworkManager(this); Settings = new Settings(this); Parcels = new ParcelManager(this); Self = new AgentManager(this); Avatars = new AvatarManager(this); Estate = new EstateTools(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); Inventory = new InventoryManager(this); Directory = new DirectoryManager(this); Terrain = new TerrainManager(this); Sound = new SoundManager(this); Throttle = new AgentThrottle(this); Stats = new OpenMetaverse.Stats.UtilizationStatistics(); }
public StaticRotatingController(string args) { string[] split_args = Arguments.Split(args); Dictionary<string, string> arg_map = Arguments.Parse(split_args); mGridClient = null; mAgentManager = null; mPeriod = TimeSpan.FromSeconds(30); if (arg_map.ContainsKey("period")) { string period_string = arg_map["period"]; mPeriod = Arguments.ParseDuration(period_string); } mLastUpdate = DateTime.Now; mAngle = 0.0f; }
/// <summary> /// Default constructor /// </summary> public GridClient() { // These are order-dependant Network = new NetworkManager(this); Settings = new Settings(this); Parcels = new ParcelManager(this); Self = new AgentManager(this); Avatars = new AvatarManager(this); Estate = new EstateTools(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); Inventory = new InventoryManager(this); Directory = new DirectoryManager(this); Terrain = new TerrainManager(this); Sound = new SoundManager(this); Throttle = new AgentThrottle(this); Stats = new OpenMetaverse.Stats.UtilizationStatistics(); }
/// <summary>Default constructor</summary> public AgentMovement(LoggerInstance log, AgentManager self, NetworkManager network) { Log = log; Network = network; Self = self; Camera = new AgentCamera(); updateInterval = Settings.DEFAULT_AGENT_UPDATE_INTERVAL; updateTimer = new Timer(new TimerCallback(UpdateTimer_Elapsed), null, Settings.DEFAULT_AGENT_UPDATE_INTERVAL, Settings.DEFAULT_AGENT_UPDATE_INTERVAL); }
/// <summary> /// Internal constructor /// </summary> /// <param name="client">A reference to the GridClient Object</param> internal FriendsManager(LoggerInstance log, NetworkManager network, InventoryManager inventory, AgentManager self, AvatarManager avatars) { Log = log; Network = network; Inventory = inventory; Self = self; Avatars = avatars; Network.OnConnected += new NetworkManager.ConnectedCallback(Network_OnConnect); Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames); Self.OnInstantMessage += new AgentManager.InstantMessageCallback(MainAvatar_InstantMessage); Network.RegisterCallback(PacketType.OnlineNotification, OnlineNotificationHandler); Network.RegisterCallback(PacketType.OfflineNotification, OfflineNotificationHandler); Network.RegisterCallback(PacketType.ChangeUserRights, ChangeUserRightsHandler); Network.RegisterCallback(PacketType.TerminateFriendship, TerminateFriendshipHandler); Network.RegisterCallback(PacketType.FindAgent, OnFindAgentReplyHandler); Network.RegisterLoginResponseCallback(new NetworkManager.LoginResponseCallback(Network_OnLoginResponse), new string[] { "buddy-list" }); }
void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { if (status == AgentManager.TeleportStatus.Finished || status == AgentManager.TeleportStatus.Failed) { if (OnTeleportFinished != null) { OnTeleportFinished(message, status, flags); } } }
/// <summary> /// Tell Vivox where we are standing /// </summary> /// <remarks>This has to be called when we move or turn.</remarks> internal void UpdatePosition(AgentManager self) { // Get position in Global coordinates Vector3d OMVpos = new Vector3d(self.GlobalPosition); // Do not send trivial updates. if (OMVpos.ApproxEquals(oldPosition, 1.0)) return; oldPosition = OMVpos; // Convert to the coordinate space that Vivox uses // OMV X is East, Y is North, Z is up // VVX X is East, Y is up, Z is South position.Position = new Vector3d(OMVpos.X, OMVpos.Z, -OMVpos.Y); // TODO Rotate these two vectors // Get azimuth from the facing Quaternion. // By definition, facing.W = Cos( angle/2 ) double angle = 2.0 * Math.Acos(self.Movement.BodyRotation.W); position.LeftOrientation = new Vector3d(-1.0, 0.0, 0.0); position.AtOrientation = new Vector3d((float)Math.Acos(angle), 0.0, -(float)Math.Asin(angle)); SessionSet3DPosition( sessionHandle, position, position); }
void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { if (status == AgentManager.TeleportStatus.Finished) { Display.TeleportFinished(Session.SessionNumber); Session.Prims = new Dictionary<uint, Primitive>(); Session.Avatars = new Dictionary<uint, Avatar>(); Session.UpdateAppearance(); //probably never needed Dictionary<string, string> identifiers = new Dictionary<string, string>(); identifiers.Add("$message", message); ScriptSystem.TriggerEvents(Session.SessionNumber, ScriptSystem.EventTypes.TeleportFinish, identifiers); } else Console.WriteLine("tp: " + status + " - " + message + " - " + flags); //debug }
/// <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, Vector3 position, Vector3 forwardAxis, Vector3 leftAxis, Vector3 upAxis, Quaternion bodyRotation, Quaternion 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); }
void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { lock (processQueue) processQueue.Enqueue(new QueueBase(new AgentManager.TeleportCallback(ProcessTeleport), message, status, flags)); }
public AssetThread(AgentManager c, SimAsset amin0) { ClientSelf = c; //.Self; repeat = !amin0.IsContinuousEffect; asset = amin0; }
/// <summary> /// Default constructor /// </summary> public GridClient() { // These are order-dependant Log = new LoggerInstance(); Network = new NetworkManager(Log); Terrain = new TerrainManager(Log, Network); Parcels = new ParcelManager(Log, Network, Terrain); Self = new AgentManager(Log, Network, Grid); Avatars = new AvatarManager(Log, Network); Friends = new FriendsManager(Log, Network, Inventory, Self, Avatars); Grid = new GridManager(Log, Network); Objects = new ObjectManager(Log, Network, Self); Groups = new GroupManager(Log, Network, Self); Assets = new AssetManager(Log, Network); Estate = new EstateTools(Log, Network, Assets); Appearance = new AppearanceManager(Log, Network, Inventory, Assets, Objects, Self); Inventory = new InventoryManager(Log, Network, Self, Assets); Directory = new DirectoryManager(Log, Network); Sound = new SoundManager(Log, Network, Self); Throttle = new AgentThrottle(Network); Settings = new Settings(this); //if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore = new Inventory(Inventory); //if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore = new Inventory(Inventory); //Inventory.OnSkeletonsReceived += // delegate(InventoryManager manager) // { // if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore.InitializeFromSkeleton(Inventory.InventorySkeleton); // if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore.InitializeFromSkeleton(Inventory.LibrarySkeleton); // }; Network.RegisterLoginResponseCallback( delegate(bool loginSuccess, bool redirect, string message, string reason, LoginResponseData replyData) { if (loginSuccess) Log.BotName = replyData.FirstName + " " + replyData.LastName; }); }
public void OnNewMovement(ref AgentManager.ControlFlags flags) { lock (scriptedcontrols) { if (scriptedcontrols.Count > 0) { SendControlToScripts((uint) flags); flags = RemoveIgnoredControls(flags, IgnoredControls); } } }
private void ProcessTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags) { switch (status) { case AgentManager.TeleportStatus.Cancelled: Console.WriteLine("ProcessTeleport Cancelled : {0}", message); break; case AgentManager.TeleportStatus.Failed: Console.WriteLine("ProcessTeleport Failed : {0}", message); break; case AgentManager.TeleportStatus.Finished: Console.WriteLine("ProcessTeleport Finished : {0}", message); break; case AgentManager.TeleportStatus.None: Console.WriteLine("ProcessTeleport None : {0}", message); break; case AgentManager.TeleportStatus.Progress: Console.WriteLine("ProcessTeleport Progress : {0}", message); break; case AgentManager.TeleportStatus.Start: Console.WriteLine("ProcessTeleport Start : {0}", message); break; } }
public InventoryManager(GridClient client, NetworkManager network, AgentManager agents) { _Client = client; _Network = network; _Agents = agents; _Network.RegisterCallback(PacketType.UpdateCreateInventoryItem, new NetworkManager.PacketCallback(UpdateCreateInventoryItemHandler)); _Network.RegisterCallback(PacketType.SaveAssetIntoInventory, new NetworkManager.PacketCallback(SaveAssetIntoInventoryHandler)); _Network.RegisterCallback(PacketType.BulkUpdateInventory, new NetworkManager.PacketCallback(BulkUpdateInventoryHandler)); _Network.RegisterCallback(PacketType.InventoryDescendents, new NetworkManager.PacketCallback(InventoryDescendentsHandler)); _Network.RegisterCallback(PacketType.FetchInventoryReply, new NetworkManager.PacketCallback(FetchInventoryReplyHandler)); _Network.RegisterCallback(PacketType.ReplyTaskInventory, new NetworkManager.PacketCallback(ReplyTaskInventoryHandler)); // Watch for inventory given to us through instant message _Agents.OnInstantMessage += new AgentManager.InstantMessageCallback(Self_OnInstantMessage); // Register extra parameters with login and parse the inventory data that comes back List<string> options = new List<string>(5); if (Settings.ENABLE_INVENTORY_STORE) { options.Add("inventory-root"); options.Add("inventory-skeleton"); } if (Settings.ENABLE_LIBRARY_STORE) { options.Add("inventory-lib-root"); options.Add("inventory-lib-owner"); options.Add("inventory-skel-lib"); } if (Settings.ENABLE_INVENTORY_STORE || Settings.ENABLE_LIBRARY_STORE) { // Register extra parameters with login and parse the inventory data that comes back _Network.RegisterLoginResponseCallback( new NetworkManager.LoginResponseCallback(Network_OnLoginResponse), options.ToArray()); } }
/// <summary> /// Default constructor /// </summary> /// <param name="client">Reference to the GridClient object</param> public InventoryManager(LoggerInstance log, NetworkManager network, AgentManager self, AssetManager assets) { _Log = log; _Network = network; _Assets = assets; _Self = self; _Network.RegisterCallback(PacketType.UpdateCreateInventoryItem, new NetworkManager.PacketCallback(UpdateCreateInventoryItemHandler)); _Network.RegisterCallback(PacketType.SaveAssetIntoInventory, new NetworkManager.PacketCallback(SaveAssetIntoInventoryHandler)); _Network.RegisterCallback(PacketType.BulkUpdateInventory, new NetworkManager.PacketCallback(BulkUpdateInventoryHandler)); _Network.RegisterCallback(PacketType.MoveInventoryItem, new NetworkManager.PacketCallback(MoveInventoryItemHandler)); _Network.RegisterCallback(PacketType.InventoryDescendents, new NetworkManager.PacketCallback(InventoryDescendentsHandler)); _Network.RegisterCallback(PacketType.FetchInventoryReply, new NetworkManager.PacketCallback(FetchInventoryReplyHandler)); _Network.RegisterCallback(PacketType.ReplyTaskInventory, new NetworkManager.PacketCallback(ReplyTaskInventoryHandler)); _Network.RegisterEventCallback("ScriptRunningReply", new Caps.EventQueueCallback(ScriptRunningReplyMessageHandler)); // Watch for inventory given to us through instant message _Self.OnInstantMessage += new AgentManager.InstantMessageCallback(Self_OnInstantMessage); // Register extra parameters with login and parse the inventory data that comes back _Network.RegisterLoginResponseCallback( new NetworkManager.LoginResponseCallback(Network_OnLoginResponse), new string[] { "inventory-root", "inventory-skeleton", "inventory-lib-root", "inventory-lib-owner", "inventory-skel-lib"}); }
// FIXME: Create a class-level appearance thread so multiple threads can't be launched /// <summary> /// Default constructor /// </summary> /// <param name="client">This agents <seealso cref="OpenMetaverse.GridClient"/> Object</param> /// <param name="assets">Reference to an AssetManager object</param> public AppearanceManager(LoggerInstance log, NetworkManager network, InventoryManager inventory, AssetManager assets, ObjectManager objects, AgentManager self) { Log = log; Network = network; Inventory = inventory; Assets = assets; Self = self; Objects = objects; // Initialize AgentTextures to zero UUIDs for (int i = 0; i < AgentTextures.Length; i++) AgentTextures[i] = UUID.Zero; Network.RegisterCallback(PacketType.AgentWearablesUpdate, new NetworkManager.PacketCallback(AgentWearablesUpdateHandler)); Network.RegisterCallback(PacketType.AgentCachedTextureResponse, new NetworkManager.PacketCallback(AgentCachedTextureResponseHandler)); Network.RegisterCallback(PacketType.RebakeAvatarTextures,new NetworkManager.PacketCallback(RebakeAvatarTexturesHandler)); Network.OnDisconnected += new NetworkManager.DisconnectedCallback(Network_OnDisconnected); }
public ObjectSorter(AgentManager me) { this.me = me; }
/// <summary> /// Group Management Routines, Methods and Packet Handlers /// </summary> /// <param name="client">A reference to the current <seealso cref="GridClient"/> instance</param> public GroupManager(LoggerInstance log, NetworkManager network, AgentManager self) { Log = log; Network = network; Self = self; GroupMembersCaches = new InternalDictionary<UUID, Dictionary<UUID, GroupMember>>(); GroupMembersRequests = new List<UUID>(); GroupRolesCaches = new InternalDictionary<UUID, Dictionary<UUID, GroupRole>>(); GroupRolesRequests = new List<UUID>(); GroupRolesMembersCaches = new InternalDictionary<UUID, List<KeyValuePair<UUID, UUID>>>(); GroupRolesMembersRequests = new List<UUID>(); GroupName2KeyCache = new InternalDictionary<UUID, string>(); Network.RegisterEventCallback("AgentGroupDataUpdate", new Caps.EventQueueCallback(AgentGroupDataUpdateHandler)); Network.RegisterCallback(PacketType.AgentDropGroup, new NetworkManager.PacketCallback(AgentDropGroupHandler)); Network.RegisterCallback(PacketType.GroupTitlesReply, new NetworkManager.PacketCallback(GroupTitlesHandler)); Network.RegisterCallback(PacketType.GroupProfileReply, new NetworkManager.PacketCallback(GroupProfileHandler)); Network.RegisterCallback(PacketType.GroupMembersReply, new NetworkManager.PacketCallback(GroupMembersHandler)); Network.RegisterCallback(PacketType.GroupRoleDataReply, new NetworkManager.PacketCallback(GroupRoleDataHandler)); Network.RegisterCallback(PacketType.GroupRoleMembersReply, new NetworkManager.PacketCallback(GroupRoleMembersHandler)); Network.RegisterCallback(PacketType.GroupActiveProposalItemReply, new NetworkManager.PacketCallback(GroupActiveProposalItemHandler)); Network.RegisterCallback(PacketType.GroupVoteHistoryItemReply, new NetworkManager.PacketCallback(GroupVoteHistoryItemHandler)); Network.RegisterCallback(PacketType.GroupAccountSummaryReply, new NetworkManager.PacketCallback(GroupAccountSummaryHandler)); Network.RegisterCallback(PacketType.CreateGroupReply, new NetworkManager.PacketCallback(CreateGroupReplyHandler)); Network.RegisterCallback(PacketType.JoinGroupReply, new NetworkManager.PacketCallback(JoinGroupReplyHandler)); Network.RegisterCallback(PacketType.LeaveGroupReply, new NetworkManager.PacketCallback(LeaveGroupReplyHandler)); Network.RegisterCallback(PacketType.UUIDGroupNameReply, new NetworkManager.PacketCallback(UUIDGroupNameReplyHandler)); Network.RegisterCallback(PacketType.EjectGroupMemberReply, new NetworkManager.PacketCallback(EjectGroupMemberReplyHandler)); Network.RegisterCallback(PacketType.GroupNoticesListReply, new NetworkManager.PacketCallback(GroupNoticesListReplyHandler)); }
/// <summary> /// Instantiates a new ObjectManager class /// </summary> /// <param name="client">A reference to the client</param> internal ObjectManager(LoggerInstance log, NetworkManager network, AgentManager self) : this(log, network, self, true) {}
/// <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, Vector3 position, Vector3 forwardAxis, Vector3 leftAxis, Vector3 upAxis, Quaternion bodyRotation, Quaternion headRotation, float farClip, AgentFlags flags, AgentState state, bool reliable) { // Since version 1.40.4 of the Linden simulator, sending this update // causes corruption of the agent position in the simulator if (Client.Network.CurrentSim != null && (!Client.Network.CurrentSim.HandshakeComplete)) return; 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); }
/// <summary> /// Instantiates a new ObjectManager class /// </summary> /// <param name="client">A reference to the client</param> /// <param name="registerCallbacks">If false, the ObjectManager won't /// register any packet callbacks and won't decode incoming object /// packets</param> protected ObjectManager(LoggerInstance log, NetworkManager network, AgentManager self, bool registerCallbacks) { Network = network; Self = self; Log = log; if (registerCallbacks) { RegisterCallbacks(); } }
internal static AgentManager.ControlFlags RemoveIgnoredControls(AgentManager.ControlFlags flags, ScriptControlled ignored) { if (ignored == ScriptControlled.CONTROL_ZERO) return flags; if ((ignored & ScriptControlled.CONTROL_BACK) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG); if ((ignored & ScriptControlled.CONTROL_FWD) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS | AgentManager.ControlFlags.AGENT_CONTROL_AT_POS); if ((ignored & ScriptControlled.CONTROL_DOWN) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG); if ((ignored & ScriptControlled.CONTROL_UP) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS | AgentManager.ControlFlags.AGENT_CONTROL_UP_POS); if ((ignored & ScriptControlled.CONTROL_LEFT) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS); if ((ignored & ScriptControlled.CONTROL_RIGHT) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG); if ((ignored & ScriptControlled.CONTROL_ROT_LEFT) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG); if ((ignored & ScriptControlled.CONTROL_ROT_RIGHT) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS); if ((ignored & ScriptControlled.CONTROL_ML_LBUTTON) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN); if ((ignored & ScriptControlled.CONTROL_LBUTTON) != 0) flags &= ~(AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_UP | AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN); //DIR_CONTROL_FLAG_FORWARD = AgentManager.ControlFlags.AGENT_CONTROL_AT_POS, //DIR_CONTROL_FLAG_BACK = AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG, //DIR_CONTROL_FLAG_LEFT = AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS, //DIR_CONTROL_FLAG_RIGHT = AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG, //DIR_CONTROL_FLAG_UP = AgentManager.ControlFlags.AGENT_CONTROL_UP_POS, //DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG, //DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG return flags; }
/// <summary> /// Default constructor /// </summary> public GridClient() { #if USE_SMART_THREAD_POOL ThreadPool = new SmartThreadPool(-1, 25); #endif // These are order-dependant #if USE_SMART_THREAD_POOL Network = new NetworkManager(this, ThreadPool); #else Network = new NetworkManager(this); #endif Settings = new Settings(this); #if USE_SMART_THREAD_POOL Parcels = new ParcelManager(this, ThreadPool); #else Parcels = new ParcelManager(this); #endif Self = new AgentManager(this); Avatars = new AvatarManager(this); Friends = new FriendsManager(this); Grid = new GridManager(this); Objects = new ObjectManager(this); Groups = new GroupManager(this); #if USE_SMART_THREAD_POOL Assets = new AssetManager(this, ThreadPool); #else Assets = new AssetManager(this); #endif 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); //if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore = new Inventory(Inventory); //if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore = new Inventory(Inventory); //Inventory.OnSkeletonsReceived += // delegate(InventoryManager manager) // { // if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore.InitializeFromSkeleton(Inventory.InventorySkeleton); // if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore.InitializeFromSkeleton(Inventory.LibrarySkeleton); // }; }