mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Application/OpenSimBase.cs OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
This commit is contained in:
@@ -702,6 +702,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
InventoryFolderBase f = new InventoryFolderBase(so.FromFolderID, userID);
|
||||
if (f != null)
|
||||
folder = m_Scene.InventoryService.GetFolder(f);
|
||||
|
||||
if(folder.Type == 14 || folder.Type == 16)
|
||||
{
|
||||
// folder.Type = 6;
|
||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.Object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -621,7 +621,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||
{
|
||||
if (!WorkItem.Cancel())
|
||||
{
|
||||
WorkItem.Abort();
|
||||
WorkItem.Cancel(true);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@@ -142,10 +142,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||
|
||||
scene.RegisterModuleInterface<IGridService>(this);
|
||||
|
||||
if (m_LocalCache.ContainsKey(scene.RegionInfo.RegionID))
|
||||
m_log.ErrorFormat("[LOCAL GRID SERVICE CONNECTOR]: simulator seems to have more than one region with the same UUID. Please correct this!");
|
||||
else
|
||||
m_LocalCache.Add(scene.RegionInfo.RegionID, new RegionCache(scene));
|
||||
lock (m_LocalCache)
|
||||
{
|
||||
if (m_LocalCache.ContainsKey(scene.RegionInfo.RegionID))
|
||||
m_log.ErrorFormat("[LOCAL GRID SERVICE CONNECTOR]: simulator seems to have more than one region with the same UUID. Please correct this!");
|
||||
else
|
||||
m_LocalCache.Add(scene.RegionInfo.RegionID, new RegionCache(scene));
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
@@ -153,8 +156,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||
if (!m_Enabled)
|
||||
return;
|
||||
|
||||
m_LocalCache[scene.RegionInfo.RegionID].Clear();
|
||||
m_LocalCache.Remove(scene.RegionInfo.RegionID);
|
||||
lock (m_LocalCache)
|
||||
{
|
||||
m_LocalCache[scene.RegionInfo.RegionID].Clear();
|
||||
m_LocalCache.Remove(scene.RegionInfo.RegionID);
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
@@ -191,12 +197,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||
|
||||
// First see if it's a neighbour, even if it isn't on this sim.
|
||||
// Neighbour data is cached in memory, so this is fast
|
||||
foreach (RegionCache rcache in m_LocalCache.Values)
|
||||
|
||||
lock (m_LocalCache)
|
||||
{
|
||||
region = rcache.GetRegionByPosition(x, y);
|
||||
if (region != null)
|
||||
foreach (RegionCache rcache in m_LocalCache.Values)
|
||||
{
|
||||
return region;
|
||||
region = rcache.GetRegionByPosition(x, y);
|
||||
if (region != null)
|
||||
{
|
||||
return region;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,12 +255,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||
{
|
||||
System.Text.StringBuilder caps = new System.Text.StringBuilder();
|
||||
|
||||
foreach (KeyValuePair<UUID, RegionCache> kvp in m_LocalCache)
|
||||
lock (m_LocalCache)
|
||||
{
|
||||
caps.AppendFormat("*** Neighbours of {0} ({1}) ***\n", kvp.Value.RegionName, kvp.Key);
|
||||
List<GridRegion> regions = kvp.Value.GetNeighbours();
|
||||
foreach (GridRegion r in regions)
|
||||
caps.AppendFormat(" {0} @ {1}-{2}\n", r.RegionName, r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize);
|
||||
foreach (KeyValuePair<UUID, RegionCache> kvp in m_LocalCache)
|
||||
{
|
||||
caps.AppendFormat("*** Neighbours of {0} ({1}) ***\n", kvp.Value.RegionName, kvp.Key);
|
||||
List<GridRegion> regions = kvp.Value.GetNeighbours();
|
||||
foreach (GridRegion r in regions)
|
||||
caps.AppendFormat(" {0} @ {1}-{2}\n", r.RegionName, r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize);
|
||||
}
|
||||
}
|
||||
|
||||
MainConsole.Instance.Output(caps.ToString());
|
||||
|
||||
Reference in New Issue
Block a user