From 1123a326ab703add89944b1e0c3a78be9bc95c45 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 13 Aug 2009 15:43:24 +0900 Subject: Formatting cleanup. Fix some compiler warnings. --- .../Hypergrid/HGCommunicationsGridMode.cs | 3 -- OpenSim/Region/Framework/Scenes/EventManager.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 49 ++++++++++------------ OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 10 ++--- 4 files changed, 28 insertions(+), 36 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs index 99a4057..381070e 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/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 1d4d6d7..7bbe045 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 61dfa52..3646811 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 e435ac1..8fdc5a7 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; -- cgit v1.1 From 94dfe2a20d357cfd21a24f976f62d1f8a44dd43e Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 13 Aug 2009 13:05:27 +0100 Subject: Add a profile module interface for the client view to use --- OpenSim/Framework/IProfileModule.cs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 OpenSim/Framework/IProfileModule.cs (limited to 'OpenSim') diff --git a/OpenSim/Framework/IProfileModule.cs b/OpenSim/Framework/IProfileModule.cs new file mode 100644 index 0000000..f54810e --- /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); + } +} -- cgit v1.1 From 0f3f2e1dc007f48dcccb27932923a8d586eedb5f Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 13 Aug 2009 13:19:12 +0100 Subject: Add reference to the profile module in the avatar profiles handler, plus an example of how to override legacy core data with data retrieved from the profile module --- .../Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs index d3324e4..a6ace63 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs @@ -41,6 +41,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 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles public void PostInitialise() { + m_profileModule = scene.RequestModuleInterface(); } public void Close() @@ -108,6 +110,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), -- cgit v1.1 From 3669115d60f4e8fbd5032836b828f6ee40901c93 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 13 Aug 2009 13:25:33 +0100 Subject: Some small fixes --- OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs index a6ace63..0f58788 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; @@ -57,7 +58,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles public void PostInitialise() { - m_profileModule = scene.RequestModuleInterface(); + m_profileModule = m_scene.RequestModuleInterface(); } public void Close() -- cgit v1.1