diff --git a/OpenSim/Framework/IProfileModule.cs b/OpenSim/Framework/IProfileModule.cs new file mode 100644 index 0000000000..f54810e791 --- /dev/null +++ b/OpenSim/Framework/IProfileModule.cs @@ -0,0 +1,37 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System.Collections; +using OpenMetaverse; + +namespace OpenSim.Framework +{ + public interface IProfileModule + { + Hashtable GetProfileData(UUID userID); + } +} diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs index 99a4057b8a..381070ee82 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs @@ -40,9 +40,6 @@ namespace OpenSim.Region.Communications.Hypergrid { public class HGCommunicationsGridMode : CommunicationsManager // CommunicationsOGS1 { - private static readonly ILog m_log - = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - IHyperlink m_osw = null; public IHyperlink HGServices { diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs index d3324e431c..0f5878873b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs @@ -26,6 +26,7 @@ */ using System; +using System.Collections; using System.Globalization; using System.Reflection; using log4net; @@ -41,6 +42,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; + private IProfileModule m_profileModule = null; public AvatarProfilesModule() { @@ -56,6 +58,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles public void PostInitialise() { + m_profileModule = m_scene.RequestModuleInterface(); } public void Close() @@ -108,6 +111,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles charterMember = Utils.StringToBytes(profile.CustomType); } + if (m_profileModule != null) + { + Hashtable profileData = m_profileModule.GetProfileData(remoteClient.AgentId); + if (profileData["ProfileUrl"] != null) + profile.ProfileUrl = profileData["ProfileUrl"].ToString(); + } remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, Util.ToDateTime(profile.Created).ToString("M/d/yyyy", CultureInfo.InvariantCulture), charterMember, profile.FirstLifeAboutText, (uint)(profile.UserFlags & 0xff), diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 1d4d6d7708..7bbe045063 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -429,7 +429,7 @@ namespace OpenSim.Region.Framework.Scenes private RequestParcelPrimCountUpdate handlerRequestParcelPrimCountUpdate = null; private ParcelPrimCountTainted handlerParcelPrimCountTainted = null; private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null; - private ScriptTimerEvent handlerScriptTimerEvent = null; + // TODO: unused: private ScriptTimerEvent handlerScriptTimerEvent = null; private EstateToolsSunUpdate handlerEstateToolsSunUpdate = null; private ScriptColliding handlerCollidingStart = null; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 61dfa527f2..36468112b5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1098,30 +1098,29 @@ if (m_shape != null) { } } - private void handleTimerAccounting(uint localID, double interval) - { - if (localID == LocalId) - { - - float sec = (float)interval; - if (m_parentGroup != null) - { - if (sec == 0) - { - if (m_parentGroup.scriptScore + 0.001f >= float.MaxValue - 0.001) - m_parentGroup.scriptScore = 0; - - m_parentGroup.scriptScore += 0.001f; - return; - } - - if (m_parentGroup.scriptScore + (0.001f / sec) >= float.MaxValue - (0.001f / sec)) - m_parentGroup.scriptScore = 0; - m_parentGroup.scriptScore += (0.001f / sec); - } - - } - } + // TODO: unused: + // private void handleTimerAccounting(uint localID, double interval) + // { + // if (localID == LocalId) + // { + // float sec = (float)interval; + // if (m_parentGroup != null) + // { + // if (sec == 0) + // { + // if (m_parentGroup.scriptScore + 0.001f >= float.MaxValue - 0.001) + // m_parentGroup.scriptScore = 0; + // + // m_parentGroup.scriptScore += 0.001f; + // return; + // } + // + // if (m_parentGroup.scriptScore + (0.001f / sec) >= float.MaxValue - (0.001f / sec)) + // m_parentGroup.scriptScore = 0; + // m_parentGroup.scriptScore += (0.001f / sec); + // } + // } + // } #endregion Private Methods @@ -1248,7 +1247,6 @@ if (m_shape != null) { } } - /// /// hook to the physics scene to apply angular impulse /// This is sent up to the group, which then finds the root prim @@ -1809,7 +1807,6 @@ if (m_shape != null) { m_parentGroup.SetHoverHeight(0f, PIDHoverType.Ground, 0f); } - public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient) { } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index e435ac1e8b..8fdc5a7572 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -304,12 +304,10 @@ namespace OpenSim.Region.Physics.OdePlugin public d.Vector3 xyz = new d.Vector3(128.1640f, 128.3079f, 25.7600f); public d.Vector3 hpr = new d.Vector3(125.5000f, -17.0000f, 0.0000f); - private uint heightmapWidth = m_regionWidth + 1; - private uint heightmapHeight = m_regionHeight + 1; - - private uint heightmapWidthSamples; - - private uint heightmapHeightSamples; + // TODO: unused: private uint heightmapWidth = m_regionWidth + 1; + // TODO: unused: private uint heightmapHeight = m_regionHeight + 1; + // TODO: unused: private uint heightmapWidthSamples; + // TODO: unused: private uint heightmapHeightSamples; private volatile int m_global_contactcount = 0;