From e333eaf4b604453da9a8952356086d4a5a1fc4a8 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 29 Feb 2008 05:46:24 +0000 Subject: * ODEPlugin ** Added more realistic calculations of mass for the rest of the supported prim shapes+holes+cuts+tapers. Previously they were the generic height * width * length. Spheres roll (Angular velocity) more realistically, etc. --- OpenSim/Region/Environment/Modules/FriendsModule.cs | 15 ++++----------- .../Environment/Modules/InstantMessageModule.cs | 20 ++++++++++++++++---- 2 files changed, 20 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index e1d3e2a..4d06750 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs @@ -45,8 +45,8 @@ namespace OpenSim.Region.Environment.Modules private List m_scene = new List(); - Dictionary m_rootAgents = new Dictionary(); + Dictionary m_pendingFriendRequests = new Dictionary(); public void Initialise(Scene scene, IConfigSource config) @@ -66,9 +66,6 @@ namespace OpenSim.Region.Environment.Modules scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; scene.EventManager.OnMakeChildAgent += MakeChildAgent; scene.EventManager.OnClientClosed += ClientLoggedOut; - - - } public XmlRpcResponse processPresenceUpdate(XmlRpcRequest req) { @@ -90,10 +87,6 @@ namespace OpenSim.Region.Environment.Modules client.OnDenyFriendRequest += OnDenyFriendRequest; client.OnTerminateFriendship += OnTerminateFriendship; - - - - } private void ClientLoggedOut(LLUUID AgentId) @@ -144,9 +137,9 @@ namespace OpenSim.Region.Environment.Modules } } - - } + } + #region FriendRequestHandling private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, @@ -293,7 +286,7 @@ namespace OpenSim.Region.Environment.Modules new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), msg.binaryBucket); } - + #endregion private ScenePresence GetPresenceFromAgentID(LLUUID AgentID) { ScenePresence returnAgent = null; diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index 8df2acb..70f3d99 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs @@ -26,27 +26,39 @@ * */ +using System.Collections; using System.Collections.Generic; using libsecondlife; using Nini.Config; +using Nwc.XmlRpc; using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; + namespace OpenSim.Region.Environment.Modules { public class InstantMessageModule : IRegionModule { private List m_scenes = new List(); + private Hashtable m_RegionInfoCache = new Hashtable(); public void Initialise(Scene scene, IConfigSource config) { - if (!m_scenes.Contains(scene)) + lock (m_scenes) { - m_scenes.Add(scene); - scene.EventManager.OnNewClient += OnNewClient; - scene.EventManager.OnGridInstantMessageToIMModule += OnGridInstantMessage; + if (m_scenes.Count == 0) + { + //scene.AddXmlRPCHandler("avatar_location_update", processPresenceUpdate); + } + + if (!m_scenes.Contains(scene)) + { + m_scenes.Add(scene); + scene.EventManager.OnNewClient += OnNewClient; + scene.EventManager.OnGridInstantMessageToIMModule += OnGridInstantMessage; + } } } -- cgit v1.1