From 7fefb80abbde4bd8a9b19cb631736b5860274134 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 16 May 2008 13:33:57 +0000 Subject: Minor cleanup. --- OpenSim/Data/NHibernate/NHibernateAssetData.cs | 4 ++-- OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 6 ++---- OpenSim/Data/NHibernate/NHibernateUserData.cs | 4 ++-- OpenSim/Framework/Util.cs | 7 +++---- OpenSim/Grid/UserServer.Config/DbUserConfig.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 23 ++++++---------------- .../Region/Environment/Scenes/SceneObjectPart.cs | 2 +- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 +- .../Modules/SvnSerialiser/SvnBackupModule.cs | 2 +- 9 files changed, 19 insertions(+), 33 deletions(-) diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index 075f2e9..7163a92 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs @@ -78,8 +78,8 @@ namespace OpenSim.Data.NHibernate cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( MemoryStream stream = - HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) + using (MemoryStream stream = + HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); factory = cfg.BuildSessionFactory(); diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index 228e0b6..902ecfb 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs @@ -75,8 +75,8 @@ namespace OpenSim.Data.NHibernate cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( MemoryStream stream = - HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) + using (MemoryStream stream = + HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); // If uncommented this will auto create tables, but it @@ -90,7 +90,6 @@ namespace OpenSim.Data.NHibernate InitDB(); } - private void InitDB() { string regex = @"no such table: Inventory"; @@ -117,7 +116,6 @@ namespace OpenSim.Data.NHibernate } } - /***************************************************************** * * Basic CRUD operations on Data diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 4de0291..678ec04 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs @@ -74,8 +74,8 @@ namespace OpenSim.Data.NHibernate cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( MemoryStream stream = - HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) + using (MemoryStream stream = + HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); // new SchemaExport(cfg).Create(true, true); diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 8e5b02d..719dda6 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -58,7 +58,7 @@ namespace OpenSim.Framework private static string regexInvalidPathChars = "[" + new String(Path.GetInvalidPathChars()) + "]"; private static object XferLock = new object(); - #region Vector Equasions + #region Vector Equations /// /// Get the distance between two 3d vectors @@ -214,8 +214,8 @@ namespace OpenSim.Framework } // Windows 2000 / Pre-SP2 XP - if (Environment.OSVersion.Version.Major == 5 && ( - Environment.OSVersion.Version.Minor == 0)) + if (Environment.OSVersion.Version.Major == 5 && + Environment.OSVersion.Version.Minor == 0) { reason = "Please update to Windows XP Service Pack 2 or Server2003"; return false; @@ -544,7 +544,6 @@ namespace OpenSim.Framework /// /// returns the contents of /etc/issue on Unix Systems /// Use this for where it's absolutely necessary to implement platform specific stuff - /// ( like the ODE library :P /// /// public static string ReadEtcIssue() diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs index 0f29bbe..93b854d 100644 --- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs +++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs @@ -40,7 +40,7 @@ namespace OpenUser.Config.UserConfigDb4o public UserConfig GetConfigObject() { m_log.Info("[DBUSERCONFIG]: Loading Db40Config dll"); - return ( new DbUserConfig()); + return new DbUserConfig(); } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 32dc7d5..bc80915 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1284,10 +1284,9 @@ namespace OpenSim.Region.Environment.Scenes byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection) { + LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f, 0.5f, 0.5f), false); - LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f,0.5f,0.5f), false); - - if ( ExternalChecks.ExternalChecksCanRezObject(1,ownerID,pos)) + if (ExternalChecks.ExternalChecksCanRezObject(1, ownerID, pos)) { // rez ON the ground, not IN the ground pos.Z += 0.25F; @@ -1515,8 +1514,6 @@ namespace OpenSim.Region.Environment.Scenes } } } - - } } return true; @@ -1525,7 +1522,6 @@ namespace OpenSim.Region.Environment.Scenes { return false; } - } #endregion @@ -1658,6 +1654,7 @@ namespace OpenSim.Region.Environment.Scenes EventManager.TriggerOnNewClient(client); } + public virtual void TeleportClientHome(LLUUID AgentId, IClientAPI client) { UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(AgentId); @@ -1701,7 +1698,7 @@ namespace OpenSim.Region.Environment.Scenes EntityIntersection ei = target.TestIntersectionOBB(NewRay, new Quaternion(1, 0, 0, 0), frontFacesOnly, false); // Un-comment out the following line to Get Raytrace results printed to the console. - // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); + // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); float ScaleOffset = 0.5f; // If we hit something @@ -1745,18 +1742,13 @@ namespace OpenSim.Region.Environment.Scenes m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID); } - return; } - return; - + return; } - - - - } + public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags) { UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(remoteClient.AgentId); @@ -1938,7 +1930,6 @@ namespace OpenSim.Region.Environment.Scenes } } } - } public override void CloseAllAgents(uint circuitcode) @@ -2014,7 +2005,6 @@ namespace OpenSim.Region.Environment.Scenes m_sceneGridService.Close(); } - /// /// Do the work necessary to initiate a new user connection. /// At the moment, this consists of setting up the caps infrastructure @@ -2164,7 +2154,6 @@ namespace OpenSim.Region.Environment.Scenes childAgentUpdate.ChildAgentDataUpdate(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); // Not Implemented: //TODO: Do we need to pass the message on to one of our neighbors? - } return true; } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index a52d5f9..80b93b1 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1282,7 +1282,7 @@ namespace OpenSim.Region.Environment.Scenes //} //} //a = (d - iray.Origin.Dot(normals[i])) / s; - //if ( iray.Direction.Dot(normals[i]) < 0) + //if (iray.Direction.Dot(normals[i]) < 0) //{ //if (a > fmax) //{ diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index ba8bbd9..44805cc 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -2312,7 +2312,7 @@ namespace OpenSim.Region.Environment.Scenes /* Dictionary updateTimes_work = new Dictionary(); - foreach ( LLUUID id in m_updateTimes.Keys) + foreach (LLUUID id in m_updateTimes.Keys) { updateTimes_work.Add(id.UUID, m_updateTimes[id]); } diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs index 6cca36d..94d2ec0 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs @@ -62,7 +62,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser } m_svnClient.Commit3(svnfilenames, true, false); - m_log.Info("[SVNBACKUP]: Server backup successful ( " + String.Concat(regions.ToArray()) + ")."); + m_log.Info("[SVNBACKUP]: Server backup successful (" + String.Concat(regions.ToArray()) + ")."); } private List CreateAndAddExport(Scene scene) -- cgit v1.1