From 3053f5ba7dd22a68099b8b1dc6b41f389b6e7183 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 10 Dec 2010 03:08:31 +0000 Subject: minor: remove some compiler warnings --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 2 +- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 2 +- OpenSim/Region/Physics/Meshing/SculptMesh.cs | 2 +- OpenSim/Services/Interfaces/IUserAccountService.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 3c58a7d..3343f60 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -1845,7 +1845,7 @@ namespace OpenSim.Framework.Servers.HttpServer /// property in StartHttp() for the HttpListener public class HttpServerLogWriter : ILogWriter { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public void Write(object source, LogPrio priority, string message) { diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 3386e72..211a0a7 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -311,7 +311,7 @@ namespace OpenSim.Region.Physics.Meshing OSD decodedMeshOsd = new OSD(); byte[] meshBytes = new byte[physSize]; System.Buffer.BlockCopy(primShape.SculptData, physOffset, meshBytes, 0, physSize); - byte[] decompressed = new byte[physSize * 5]; +// byte[] decompressed = new byte[physSize * 5]; try { using (MemoryStream inMs = new MemoryStream(meshBytes)) diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs index e58eb89..4a7f3ad 100644 --- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs +++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs @@ -375,7 +375,7 @@ namespace PrimMesher int coordsDown = rows.Count; int coordsAcross = rows[0].Count; - int lastColumn = coordsAcross - 1; +// int lastColumn = coordsAcross - 1; float widthUnit = 1.0f / (coordsAcross - 1); float heightUnit = 1.0f / (coordsDown - 1); diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs index c580078..9c992e0 100644 --- a/OpenSim/Services/Interfaces/IUserAccountService.cs +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs @@ -101,7 +101,7 @@ namespace OpenSim.Services.Interfaces if (str != string.Empty) { string[] parts = str.Split(new char[] { ';' }); - Dictionary dic = new Dictionary(); +// Dictionary dic = new Dictionary(); foreach (string s in parts) { string[] parts2 = s.Split(new char[] { '*' }); -- cgit v1.1 From a918c8df97572e49eea7155099feea6e4f207264 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 10 Dec 2010 03:46:16 +0000 Subject: fix the minimap sitting avatar location bug a sitting avatar should have it's offset position added to the scene object, not its absolute position --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 032c859..78e5da3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID); if (sop != null) { - coarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition); + coarseLocations.Add(sop.AbsolutePosition + sp.OffsetPosition); avatarUUIDs.Add(sp.UUID); } else -- cgit v1.1 From 3ef9a4da9a12a9a4066b813556748aa9d158e212 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 10 Dec 2010 03:51:33 +0000 Subject: update libode for 64 bit linux to r1755 (post 0.11.1) from ode 0.10.1 the same thing was actually done for ode.dll a couple of commits ago but I got the commit msg wrong (should have been r1755, not r1754). Damn these fat fingers. --- bin/libode-x86_64.so | Bin 3587448 -> 5546089 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/bin/libode-x86_64.so b/bin/libode-x86_64.so index 57b7e1d..9c3070a 100644 Binary files a/bin/libode-x86_64.so and b/bin/libode-x86_64.so differ -- cgit v1.1 From 6f37290f4ccf0d3e516edcc38406cffaf35bcaac Mon Sep 17 00:00:00 2001 From: Marck Date: Fri, 10 Dec 2010 17:48:45 +0100 Subject: Adjust hypergrid console commands to latest changes. --- OpenSim/Services/GridService/HypergridLinker.cs | 105 +++++++++--------------- 1 file changed, 41 insertions(+), 64 deletions(-) diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 31c7b80..9863ba0 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -26,6 +26,7 @@ */ using System; +using System.Collections; using System.Collections.Generic; using System.Linq; using System.Net; @@ -244,7 +245,9 @@ namespace OpenSim.Services.GridService GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); if (region != null) { - m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", regInfo.RegionLocX, regInfo.RegionLocY, region.RegionName, region.RegionID); + m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", + regInfo.RegionLocX / Constants.RegionSize, regInfo.RegionLocY / Constants.RegionSize, + region.RegionName, region.RegionID); reason = "Coordinates are already in use"; return false; } @@ -273,7 +276,8 @@ namespace OpenSim.Services.GridService region = m_GridService.GetRegionByUUID(scopeID, regionID); if (region != null) { - m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize); + m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", + region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize); regInfo = region; return true; } @@ -425,15 +429,14 @@ namespace OpenSim.Services.GridService return; } - MainConsole.Instance.Output("Region Name Region UUID"); - MainConsole.Instance.Output("Location URI"); - MainConsole.Instance.Output("-------------------------------------------------------------------------------"); + MainConsole.Instance.Output("Region Name"); + MainConsole.Instance.Output("Location Region UUID"); + MainConsole.Instance.Output(new string('-', 72)); foreach (RegionData r in regions) { - MainConsole.Instance.Output(String.Format("{0,-39} {1}\n{2,-39} {3}\n", - r.RegionName, r.RegionID, - String.Format("{0},{1} ({2},{3})", r.posX, r.posY, r.posX / 256, r.posY / 256), - r.Data["serverURI"].ToString())); + MainConsole.Instance.Output(String.Format("{0}\n{2,-32} {1}\n", + r.RegionName, r.RegionID, String.Format("{0},{1} ({2},{3})", r.posX, r.posY, + r.posX / Constants.RegionSize, r.posY / Constants.RegionSize))); } return; } @@ -461,11 +464,14 @@ namespace OpenSim.Services.GridService xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize; yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize; serverURI = cmdparams[2]; - if (cmdparams.Length == 4) - remoteName = cmdparams[3]; + if (cmdparams.Length > 3) + remoteName = string.Join(" ", cmdparams, 3, cmdparams.Length - 3); string reason = string.Empty; GridRegion regInfo; - TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason); + if (TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason)) + MainConsole.Instance.Output("Hyperlink established"); + else + MainConsole.Instance.Output("Failed to link region: " + reason); } private void RunHGCommand(string command, string[] cmdparams) @@ -490,18 +496,6 @@ namespace OpenSim.Services.GridService } else if (command.Equals("link-region")) { - if (cmdparams.Length > 0 && cmdparams.Length < 5) - { - RunLinkRegionCommand(cmdparams); - } - else - { - LinkRegionCmdUsage(); - } - return; - } - else if (command.Equals("link-region")) - { if (cmdparams.Length < 3) { if ((cmdparams.Length == 1) || (cmdparams.Length == 2)) @@ -516,40 +510,24 @@ namespace OpenSim.Services.GridService } //this should be the prefererred way of setting up hg links now - if ( cmdparams[2].StartsWith("http") && ( cmdparams.Length >= 3 && cmdparams.Length <= 5 )) { + if (cmdparams[2].StartsWith("http")) + { RunLinkRegionCommand(cmdparams); } else if (cmdparams[2].Contains(":")) { // New format - int xloc, yloc; - string mapName; - try - { - xloc = Convert.ToInt32(cmdparams[0]); - yloc = Convert.ToInt32(cmdparams[1]); - mapName = cmdparams[2]; - if (cmdparams.Length > 3) - for (int i = 3; i < cmdparams.Length; i++) - mapName += " " + cmdparams[i]; - - //m_log.Info(">> MapName: " + mapName); - } - catch (Exception e) + string[] parts = cmdparams[2].Split(':'); + if (parts.Length > 2) { - MainConsole.Instance.Output("[HGrid] Wrong format for link-region command: " + e.Message); - LinkRegionCmdUsage(); - return; + // Insert remote region name + ArrayList parameters = new ArrayList(cmdparams); + parameters.Insert(3, parts[2]); + cmdparams = (string[])parameters.ToArray(typeof(string)); } + cmdparams[2] = "http://" + parts[0] + ':' + parts[1]; - // Convert cell coordinates given by the user to meters - xloc = xloc * (int)Constants.RegionSize; - yloc = yloc * (int)Constants.RegionSize; - string reason = string.Empty; - if (TryLinkRegionToCoords(UUID.Zero, mapName, xloc, yloc, out reason) == null) - MainConsole.Instance.Output("Failed to link region: " + reason); - else - MainConsole.Instance.Output("Hyperlink established"); + RunLinkRegionCommand(cmdparams); } else { @@ -558,16 +536,12 @@ namespace OpenSim.Services.GridService int xloc, yloc; uint externalPort; string externalHostName; - string serverURI; try { xloc = Convert.ToInt32(cmdparams[0]); yloc = Convert.ToInt32(cmdparams[1]); externalPort = Convert.ToUInt32(cmdparams[3]); externalHostName = cmdparams[2]; - if ( cmdparams.Length == 4 ) { - - } //internalPort = Convert.ToUInt32(cmdparams[4]); //remotingPort = Convert.ToUInt32(cmdparams[5]); } @@ -584,27 +558,30 @@ namespace OpenSim.Services.GridService string reason = string.Empty; if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) { - if (cmdparams.Length >= 5) - { - regInfo.RegionName = ""; - for (int i = 4; i < cmdparams.Length; i++) - regInfo.RegionName += cmdparams[i] + " "; - } + // What is this? The GridRegion instance will be discarded anyway, + // which effectively ignores any local name given with the command. + //if (cmdparams.Length >= 5) + //{ + // regInfo.RegionName = ""; + // for (int i = 4; i < cmdparams.Length; i++) + // regInfo.RegionName += cmdparams[i] + " "; + //} } } return; } else if (command.Equals("unlink-region")) { - if (cmdparams.Length < 1 || cmdparams.Length > 1) + if (cmdparams.Length < 1) { UnlinkRegionCmdUsage(); return; } - if (TryUnlinkRegion(cmdparams[0])) - MainConsole.Instance.Output("Successfully unlinked " + cmdparams[0]); + string region = string.Join(" ", cmdparams); + if (TryUnlinkRegion(region)) + MainConsole.Instance.Output("Successfully unlinked " + region); else - MainConsole.Instance.Output("Unable to unlink " + cmdparams[0] + ", region not found."); + MainConsole.Instance.Output("Unable to unlink " + region + ", region not found."); } } -- cgit v1.1