mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Resolve merge commits, stage 1
This commit is contained in:
@@ -129,14 +129,12 @@ namespace OpenSim.Region.CoreModules.World
|
||||
switch (cmd[1])
|
||||
{
|
||||
case "enable":
|
||||
if (scene.LoginsDisabled)
|
||||
MainConsole.Instance.Output(String.Format("Enabling logins for region {0}", scene.RegionInfo.RegionName));
|
||||
scene.LoginsDisabled = false;
|
||||
MainConsole.Instance.Output(String.Format("Logins are enabled for region {0}", scene.RegionInfo.RegionName));
|
||||
break;
|
||||
case "disable":
|
||||
if (!scene.LoginsDisabled)
|
||||
MainConsole.Instance.Output(String.Format("Disabling logins for region {0}", scene.RegionInfo.RegionName));
|
||||
scene.LoginsDisabled = true;
|
||||
MainConsole.Instance.Output(String.Format("Logins are disabled for region {0}", scene.RegionInfo.RegionName));
|
||||
break;
|
||||
case "status":
|
||||
if (scene.LoginsDisabled)
|
||||
|
||||
@@ -68,8 +68,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
SerialiserModule serialiserModule = new SerialiserModule();
|
||||
TerrainModule terrainModule = new TerrainModule();
|
||||
|
||||
m_scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule);
|
||||
m_scene = SceneHelpers.SetupScene();
|
||||
SceneHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule);
|
||||
}
|
||||
|
||||
private void LoadCompleted(Guid requestId, string errorMessage)
|
||||
@@ -125,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
[Test]
|
||||
public void TestSaveOar()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneObjectPart part1 = CreateSceneObjectPart1();
|
||||
@@ -217,7 +217,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
[Test]
|
||||
public void TestSaveOarNoAssets()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneObjectPart part1 = CreateSceneObjectPart1();
|
||||
@@ -300,7 +300,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
[Test]
|
||||
public void TestLoadOar()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
MemoryStream archiveWriteStream = new MemoryStream();
|
||||
@@ -409,7 +409,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
[Test]
|
||||
public void TestLoadOarRegionSettings()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
MemoryStream archiveWriteStream = new MemoryStream();
|
||||
@@ -505,7 +505,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
//[Test]
|
||||
public void TestMergeOar()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
//XmlConfigurator.Configure();
|
||||
|
||||
MemoryStream archiveWriteStream = new MemoryStream();
|
||||
@@ -524,8 +524,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
SerialiserModule serialiserModule = new SerialiserModule();
|
||||
TerrainModule terrainModule = new TerrainModule();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule);
|
||||
Scene scene = SceneHelpers.SetupScene();
|
||||
SceneHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule);
|
||||
|
||||
m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
|
||||
|
||||
|
||||
@@ -875,41 +875,35 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
SceneObjectPart prt = Scene.GetSceneObjectPart(obj);
|
||||
if (prt != null)
|
||||
{
|
||||
if (prt.ParentGroup != null)
|
||||
SceneObjectGroup sog = prt.ParentGroup;
|
||||
LandStatReportItem lsri = new LandStatReportItem();
|
||||
lsri.LocationX = sog.AbsolutePosition.X;
|
||||
lsri.LocationY = sog.AbsolutePosition.Y;
|
||||
lsri.LocationZ = sog.AbsolutePosition.Z;
|
||||
lsri.Score = SceneData[obj];
|
||||
lsri.TaskID = sog.UUID;
|
||||
lsri.TaskLocalID = sog.LocalId;
|
||||
lsri.TaskName = sog.GetPartName(obj);
|
||||
lsri.OwnerName = "waiting";
|
||||
lock (uuidNameLookupList)
|
||||
uuidNameLookupList.Add(sog.OwnerID);
|
||||
|
||||
if (filter.Length != 0)
|
||||
{
|
||||
SceneObjectGroup sog = prt.ParentGroup;
|
||||
if (sog != null)
|
||||
if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter)))
|
||||
{
|
||||
LandStatReportItem lsri = new LandStatReportItem();
|
||||
lsri.LocationX = sog.AbsolutePosition.X;
|
||||
lsri.LocationY = sog.AbsolutePosition.Y;
|
||||
lsri.LocationZ = sog.AbsolutePosition.Z;
|
||||
lsri.Score = SceneData[obj];
|
||||
lsri.TaskID = sog.UUID;
|
||||
lsri.TaskLocalID = sog.LocalId;
|
||||
lsri.TaskName = sog.GetPartName(obj);
|
||||
lsri.OwnerName = "waiting";
|
||||
lock (uuidNameLookupList)
|
||||
uuidNameLookupList.Add(sog.OwnerID);
|
||||
|
||||
if (filter.Length != 0)
|
||||
{
|
||||
if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter)))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
SceneReport.Add(lsri);
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SceneReport.Add(lsri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
remoteClient.SendLandStatReply(reportType, requestFlags, (uint)SceneReport.Count,SceneReport.ToArray());
|
||||
|
||||
if (uuidNameLookupList.Count > 0)
|
||||
|
||||
@@ -423,17 +423,49 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
SendLandUpdate(avatar, false);
|
||||
}
|
||||
|
||||
public void EventManagerOnSignificantClientMovement(IClientAPI remote_client)
|
||||
public void EventManagerOnSignificantClientMovement(ScenePresence clientAvatar)
|
||||
{
|
||||
ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId);
|
||||
|
||||
if (clientAvatar != null)
|
||||
SendLandUpdate(clientAvatar);
|
||||
SendOutNearestBanLine(clientAvatar.ControllingClient);
|
||||
ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y);
|
||||
if (parcel != null)
|
||||
{
|
||||
SendLandUpdate(clientAvatar);
|
||||
SendOutNearestBanLine(remote_client);
|
||||
ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y);
|
||||
if (parcel != null)
|
||||
EnforceBans(parcel, clientAvatar);
|
||||
if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
|
||||
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
|
||||
{
|
||||
EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
|
||||
m_scene.RegionInfo.RegionID);
|
||||
//They are going under the safety line!
|
||||
if (!parcel.IsBannedFromLand(clientAvatar.UUID))
|
||||
{
|
||||
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
|
||||
}
|
||||
}
|
||||
else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
|
||||
parcel.IsBannedFromLand(clientAvatar.UUID))
|
||||
{
|
||||
//once we've sent the message once, keep going toward the target until we are done
|
||||
if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId))
|
||||
{
|
||||
SendYouAreBannedNotice(clientAvatar);
|
||||
ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
|
||||
}
|
||||
}
|
||||
else if (parcel.IsRestrictedFromLand(clientAvatar.UUID))
|
||||
{
|
||||
//once we've sent the message once, keep going toward the target until we are done
|
||||
if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId))
|
||||
{
|
||||
SendYouAreRestrictedNotice(clientAvatar);
|
||||
ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//when we are finally in a safe place, lets release the forced position lock
|
||||
forcedPosition.Remove(clientAvatar.ControllingClient.AgentId);
|
||||
}
|
||||
EnforceBans(parcel, clientAvatar);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -665,7 +697,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
// Corner case. If an autoreturn happens during sim startup
|
||||
// we will come here with the list uninitialized
|
||||
//
|
||||
int landId = m_landIDList[x, y];
|
||||
// int landId = m_landIDList[x, y];
|
||||
|
||||
// if (landId == 0)
|
||||
// m_log.DebugFormat(
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
public class PrimCountModule : IPrimCountModule, INonSharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_Scene;
|
||||
private Dictionary<UUID, PrimCounts> m_PrimCounts =
|
||||
|
||||
@@ -64,8 +64,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
{
|
||||
m_pcm = new PrimCountModule();
|
||||
LandManagementModule lmm = new LandManagementModule();
|
||||
m_scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(m_scene, lmm, m_pcm);
|
||||
m_scene = SceneHelpers.SetupScene();
|
||||
SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm);
|
||||
|
||||
int xParcelDivider = (int)Constants.RegionSize - 1;
|
||||
|
||||
@@ -106,12 +106,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestAddOwnerObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
m_scene.AddNewSceneObject(sog, false);
|
||||
|
||||
Assert.That(pc.Owner, Is.EqualTo(3));
|
||||
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
Assert.That(pc.Simulator, Is.EqualTo(3));
|
||||
|
||||
// Add a second object and retest
|
||||
SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
|
||||
SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
|
||||
m_scene.AddNewSceneObject(sog2, false);
|
||||
|
||||
Assert.That(pc.Owner, Is.EqualTo(5));
|
||||
@@ -143,12 +143,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestCopyOwnerObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
m_scene.AddNewSceneObject(sog, false);
|
||||
m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity);
|
||||
|
||||
@@ -169,12 +169,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestMoveOwnerObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
m_scene.AddNewSceneObject(sog, false);
|
||||
SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
|
||||
SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
|
||||
m_scene.AddNewSceneObject(sog2, false);
|
||||
|
||||
// Move the first scene object to the eastern strip parcel
|
||||
@@ -230,13 +230,13 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestRemoveOwnerObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false);
|
||||
SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
|
||||
m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false);
|
||||
SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
|
||||
m_scene.AddNewSceneObject(sogToDelete, false);
|
||||
m_scene.DeleteSceneObject(sogToDelete, false);
|
||||
|
||||
@@ -253,14 +253,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestAddGroupObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
m_lo.DeedToGroup(m_groupId);
|
||||
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
|
||||
SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
|
||||
sog.GroupID = m_groupId;
|
||||
m_scene.AddNewSceneObject(sog, false);
|
||||
|
||||
@@ -284,18 +284,18 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestRemoveGroupObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
m_lo.DeedToGroup(m_groupId);
|
||||
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
SceneObjectGroup sogToKeep = SceneSetupHelpers.CreateSceneObject(1, m_userId, "a", 0x1);
|
||||
SceneObjectGroup sogToKeep = SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1);
|
||||
sogToKeep.GroupID = m_groupId;
|
||||
m_scene.AddNewSceneObject(sogToKeep, false);
|
||||
|
||||
SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
|
||||
SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
|
||||
m_scene.AddNewSceneObject(sogToDelete, false);
|
||||
m_scene.DeleteSceneObject(sogToDelete, false);
|
||||
|
||||
@@ -313,12 +313,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestAddOthersObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
|
||||
SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
|
||||
m_scene.AddNewSceneObject(sog, false);
|
||||
|
||||
Assert.That(pc.Owner, Is.EqualTo(0));
|
||||
@@ -334,13 +334,13 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestRemoveOthersObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false);
|
||||
SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10);
|
||||
m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false);
|
||||
SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10);
|
||||
m_scene.AddNewSceneObject(sogToDelete, false);
|
||||
m_scene.DeleteSceneObject(sogToDelete, false);
|
||||
|
||||
@@ -360,10 +360,10 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
[Test]
|
||||
public void TestTaint()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
m_scene.AddNewSceneObject(sog, false);
|
||||
|
||||
m_pcm.TaintPrimCount();
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
|
||||
private Bitmap fetchTexture(UUID id)
|
||||
{
|
||||
AssetBase asset = m_scene.AssetService.Get(id.ToString());
|
||||
m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null);
|
||||
m_log.DebugFormat("[TexturedMapTileRenderer]: Fetched texture {0}, found: {1}", id, asset != null);
|
||||
if (asset == null) return null;
|
||||
|
||||
ManagedImage managedImage;
|
||||
|
||||
@@ -53,17 +53,17 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
|
||||
public void SetUp()
|
||||
{
|
||||
m_module = new MoapModule();
|
||||
m_scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(m_scene, m_module);
|
||||
m_scene = SceneHelpers.SetupScene();
|
||||
SceneHelpers.SetupSceneModules(m_scene, m_module);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestClearMediaUrl()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(m_scene);
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene);
|
||||
MediaEntry me = new MediaEntry();
|
||||
|
||||
m_module.SetMediaEntry(part, 1, me);
|
||||
@@ -84,11 +84,11 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
|
||||
[Test]
|
||||
public void TestSetMediaUrl()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
|
||||
string homeUrl = "opensimulator.org";
|
||||
|
||||
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(m_scene);
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene);
|
||||
MediaEntry me = new MediaEntry() { HomeURL = homeUrl };
|
||||
|
||||
m_module.SetMediaEntry(part, 1, me);
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
|
||||
IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice)
|
||||
{
|
||||
SceneObjectPart part = m_scene.GetSceneObjectPart(localID);
|
||||
if (part == null || part.ParentGroup == null)
|
||||
if (part == null)
|
||||
return;
|
||||
|
||||
if (part.ParentGroup.IsDeleted)
|
||||
@@ -111,9 +111,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
|
||||
if (part == null)
|
||||
return false;
|
||||
|
||||
if (part.ParentGroup == null)
|
||||
return false;
|
||||
|
||||
SceneObjectGroup group = part.ParentGroup;
|
||||
|
||||
switch (saleType)
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
= ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors);
|
||||
|
||||
if (m_bypassPermissions)
|
||||
m_log.Info("[PERMISSIONS]: serviceside_object_permissions = false in ini file so disabling all region service permission checks");
|
||||
m_log.Info("[PERMISSIONS]: serverside_object_permissions = false in ini file so disabling all region service permission checks");
|
||||
else
|
||||
m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
|
||||
|
||||
@@ -1131,7 +1131,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
SceneObjectPart part = scene.GetSceneObjectPart(objectID);
|
||||
if (part.OwnerID != moverID)
|
||||
{
|
||||
if (part.ParentGroup != null && !part.ParentGroup.IsDeleted)
|
||||
if (!part.ParentGroup.IsDeleted)
|
||||
{
|
||||
if (part.ParentGroup.IsAttachment)
|
||||
return false;
|
||||
|
||||
@@ -236,14 +236,14 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
||||
public void Init()
|
||||
{
|
||||
m_serialiserModule = new SerialiserModule();
|
||||
m_scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(m_scene, m_serialiserModule);
|
||||
m_scene = SceneHelpers.SetupScene();
|
||||
SceneHelpers.SetupSceneModules(m_scene, m_serialiserModule);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDeserializeXml()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(xml);
|
||||
@@ -259,7 +259,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
||||
[Test]
|
||||
public void TestSerializeXml()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
string rpName = "My Little Donkey";
|
||||
@@ -334,7 +334,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
||||
[Test]
|
||||
public void TestDeserializeXml2()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneObjectGroup so = m_serialiserModule.DeserializeGroupFromXml2(xml2);
|
||||
@@ -350,7 +350,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
||||
[Test]
|
||||
public void TestSerializeXml2()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
TestHelpers.InMethod();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
string rpName = "My Little Pony";
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
|
||||
if (grp.IsAttachment)
|
||||
{
|
||||
if (grp.GetAttachmentPoint() > 30) // HUD
|
||||
if (grp.AttachmentPoint > 30) // HUD
|
||||
{
|
||||
if (sp.ControllingClient.AgentId != grp.OwnerID)
|
||||
return;
|
||||
@@ -115,7 +115,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
{
|
||||
SceneObjectGroup grp = part.ParentGroup;
|
||||
|
||||
if (grp.IsAttachment && grp.GetAttachmentPoint() > 30)
|
||||
if (grp.IsAttachment && grp.AttachmentPoint > 30)
|
||||
{
|
||||
objectID = ownerID;
|
||||
parentID = ownerID;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||
private ITerrainChannel m_revert;
|
||||
private Scene m_scene;
|
||||
private volatile bool m_tainted;
|
||||
private readonly UndoStack<LandUndoState> m_undo = new UndoStack<LandUndoState>(5);
|
||||
private readonly Stack<LandUndoState> m_undo = new Stack<LandUndoState>(5);
|
||||
|
||||
#region ICommandableModule Members
|
||||
|
||||
|
||||
@@ -100,15 +100,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Vegetation
|
||||
{
|
||||
case Tree.Cypress1:
|
||||
case Tree.Cypress2:
|
||||
tree.Scale = new Vector3(4, 4, 10);
|
||||
tree.Scale *= new Vector3(8, 8, 20);
|
||||
break;
|
||||
|
||||
// case... other tree types
|
||||
// tree.Scale = new Vector3(?, ?, ?);
|
||||
// tree.Scale *= new Vector3(?, ?, ?);
|
||||
// break;
|
||||
|
||||
default:
|
||||
tree.Scale = new Vector3(4, 4, 4);
|
||||
tree.Scale *= new Vector3(8, 8, 8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,16 +96,7 @@ m_log.DebugFormat("MAP NAME=({0})", mapName);
|
||||
|
||||
// try to fetch from GridServer
|
||||
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
||||
if (regionInfos == null)
|
||||
{
|
||||
m_log.Warn("[MAPSEARCHMODULE]: RequestNamedRegions returned null. Old gridserver?");
|
||||
// service wasn't available; maybe still an old GridServer. Try the old API, though it will return only one region
|
||||
regionInfos = new List<GridRegion>();
|
||||
GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName);
|
||||
if (info != null)
|
||||
regionInfos.Add(info);
|
||||
}
|
||||
else if (regionInfos.Count == 0)
|
||||
if (regionInfos.Count == 0)
|
||||
remoteClient.SendAlertMessage("Hyperlink could not be established.");
|
||||
|
||||
//m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count);
|
||||
|
||||
@@ -46,6 +46,7 @@ using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.CoreModules.World.Land;
|
||||
using Caps=OpenSim.Framework.Capabilities.Caps;
|
||||
using OSDArray=OpenMetaverse.StructuredData.OSDArray;
|
||||
using OSDMap=OpenMetaverse.StructuredData.OSDMap;
|
||||
@@ -68,6 +69,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
protected Scene m_scene;
|
||||
private List<MapBlockData> cachedMapBlocks = new List<MapBlockData>();
|
||||
private int cachedTime = 0;
|
||||
private int blacklistTimeout = 10*60*1000; // 10 minutes
|
||||
private byte[] myMapImageJPEG;
|
||||
protected volatile bool m_Enabled = false;
|
||||
private Dictionary<UUID, MapRequestState> m_openRequests = new Dictionary<UUID, MapRequestState>();
|
||||
@@ -85,6 +87,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
IConfig startupConfig = config.Configs["Startup"];
|
||||
if (startupConfig.GetString("WorldMapModule", "WorldMap") == "WorldMap")
|
||||
m_Enabled = true;
|
||||
|
||||
blacklistTimeout = startupConfig.GetInt("BlacklistTimeout", 10*60) * 1000;
|
||||
}
|
||||
|
||||
public virtual void AddRegion (Scene scene)
|
||||
@@ -159,11 +163,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
m_scene.EventManager.OnClientClosed += ClientLoggedOut;
|
||||
m_scene.EventManager.OnMakeChildAgent += MakeChildAgent;
|
||||
m_scene.EventManager.OnMakeRootAgent += MakeRootAgent;
|
||||
m_scene.EventManager.OnRegionUp += OnRegionUp;
|
||||
|
||||
StartThread(new object());
|
||||
}
|
||||
|
||||
// this has to be called with a lock on m_scene
|
||||
protected virtual void RemoveHandlers()
|
||||
{
|
||||
StopThread();
|
||||
|
||||
m_scene.EventManager.OnRegionUp -= OnRegionUp;
|
||||
m_scene.EventManager.OnMakeRootAgent -= MakeRootAgent;
|
||||
m_scene.EventManager.OnMakeChildAgent -= MakeChildAgent;
|
||||
m_scene.EventManager.OnClientClosed -= ClientLoggedOut;
|
||||
@@ -279,7 +289,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
/// <returns></returns>
|
||||
public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq)
|
||||
{
|
||||
m_log.Debug("[WORLD MAP]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName);
|
||||
m_log.DebugFormat("[WORLD MAP]: MapLayer Request in region: {0}", m_scene.RegionInfo.RegionName);
|
||||
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
||||
mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
|
||||
return mapResponse;
|
||||
@@ -321,8 +331,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
m_rootAgents.Remove(AgentId);
|
||||
if (m_rootAgents.Count == 0)
|
||||
StopThread();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -362,6 +370,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
public virtual void HandleMapItemRequest(IClientAPI remoteClient, uint flags,
|
||||
uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
|
||||
{
|
||||
// m_log.DebugFormat("[WORLD MAP]: Handle MapItem request {0} {1}", regionhandle, itemtype);
|
||||
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
if (!m_rootAgents.Contains(remoteClient.AgentId))
|
||||
@@ -370,7 +380,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
uint xstart = 0;
|
||||
uint ystart = 0;
|
||||
Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart);
|
||||
if (itemtype == 6) // we only sevice 6 right now (avatar green dots)
|
||||
if (itemtype == 6) // Service 6 right now (MAP_ITEM_AGENTS_LOCATION; green dots)
|
||||
{
|
||||
if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
|
||||
{
|
||||
@@ -414,14 +424,57 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
// Remote Map Item Request
|
||||
|
||||
// ensures that the blockingqueue doesn't get borked if the GetAgents() timing changes.
|
||||
// Note that we only start up a remote mapItem Request thread if there's users who could
|
||||
// be making requests
|
||||
if (!threadrunning)
|
||||
{
|
||||
m_log.Warn("[WORLD MAP]: Starting new remote request thread manually. This means that AvatarEnteringParcel never fired! This needs to be fixed! Don't Mantis this, as the developers can see it in this message");
|
||||
StartThread(new object());
|
||||
}
|
||||
RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle);
|
||||
}
|
||||
} else if (itemtype == 7) // Service 7 (MAP_ITEM_LAND_FOR_SALE)
|
||||
{
|
||||
if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
|
||||
{
|
||||
// Parcels
|
||||
ILandChannel landChannel = m_scene.LandChannel;
|
||||
List<ILandObject> parcels = landChannel.AllParcels();
|
||||
|
||||
// Local Map Item Request
|
||||
List<mapItemReply> mapitems = new List<mapItemReply>();
|
||||
mapItemReply mapitem = new mapItemReply();
|
||||
if ((parcels != null) && (parcels.Count >= 1))
|
||||
{
|
||||
foreach (ILandObject parcel_interface in parcels)
|
||||
{
|
||||
// Play it safe
|
||||
if (!(parcel_interface is LandObject))
|
||||
continue;
|
||||
|
||||
LandObject land = (LandObject)parcel_interface;
|
||||
LandData parcel = land.LandData;
|
||||
|
||||
// Show land for sale
|
||||
if ((parcel.Flags & (uint)ParcelFlags.ForSale) == (uint)ParcelFlags.ForSale)
|
||||
{
|
||||
Vector3 min = parcel.AABBMin;
|
||||
Vector3 max = parcel.AABBMax;
|
||||
float x = (min.X+max.X)/2;
|
||||
float y = (min.Y+max.Y)/2;
|
||||
|
||||
mapitem = new mapItemReply();
|
||||
mapitem.x = (uint)(xstart + x);
|
||||
mapitem.y = (uint)(ystart + y);
|
||||
// mapitem.z = (uint)m_scene.GetGroundHeight(x,y);
|
||||
mapitem.id = UUID.Zero;
|
||||
mapitem.name = parcel.Name;
|
||||
mapitem.Extra = parcel.Area;
|
||||
mapitem.Extra2 = parcel.SalePrice;
|
||||
mapitems.Add(mapitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
remoteClient.SendMapItemReply(mapitems.ToArray(), itemtype, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remote Map Item Request
|
||||
|
||||
// ensures that the blockingqueue doesn't get borked if the GetAgents() timing changes.
|
||||
RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle);
|
||||
}
|
||||
}
|
||||
@@ -542,6 +595,28 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
}
|
||||
av.ControllingClient.SendMapItemReply(returnitems.ToArray(), mrs.itemtype, mrs.flags);
|
||||
}
|
||||
|
||||
// Service 7 (MAP_ITEM_LAND_FOR_SALE)
|
||||
uint itemtype = 7;
|
||||
|
||||
if (response.ContainsKey(itemtype.ToString()))
|
||||
{
|
||||
List<mapItemReply> returnitems = new List<mapItemReply>();
|
||||
OSDArray itemarray = (OSDArray)response[itemtype.ToString()];
|
||||
for (int i = 0; i < itemarray.Count; i++)
|
||||
{
|
||||
OSDMap mapitem = (OSDMap)itemarray[i];
|
||||
mapItemReply mi = new mapItemReply();
|
||||
mi.x = (uint)mapitem["X"].AsInteger();
|
||||
mi.y = (uint)mapitem["Y"].AsInteger();
|
||||
mi.id = mapitem["ID"].AsUUID();
|
||||
mi.Extra = mapitem["Extra"].AsInteger();
|
||||
mi.Extra2 = mapitem["Extra2"].AsInteger();
|
||||
mi.name = mapitem["Name"].AsString();
|
||||
returnitems.Add(mi);
|
||||
}
|
||||
av.ControllingClient.SendMapItemReply(returnitems.ToArray(), itemtype, mrs.flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -589,12 +664,23 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
private OSDMap RequestMapItemsAsync(UUID id, uint flags,
|
||||
uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
|
||||
{
|
||||
// m_log.DebugFormat("[WORLDMAP]: RequestMapItemsAsync; region handle: {0} {1}", regionhandle, itemtype);
|
||||
|
||||
string httpserver = "";
|
||||
bool blacklisted = false;
|
||||
lock (m_blacklistedregions)
|
||||
{
|
||||
if (m_blacklistedregions.ContainsKey(regionhandle))
|
||||
blacklisted = true;
|
||||
{
|
||||
if (Environment.TickCount > (m_blacklistedregions[regionhandle] + blacklistTimeout))
|
||||
{
|
||||
m_log.DebugFormat("[WORLDMAP]: Unblock blacklisted region {0}", regionhandle);
|
||||
|
||||
m_blacklistedregions.Remove(regionhandle);
|
||||
}
|
||||
else
|
||||
blacklisted = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (blacklisted)
|
||||
@@ -636,7 +722,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
lock (m_blacklistedurls)
|
||||
{
|
||||
if (m_blacklistedurls.ContainsKey(httpserver))
|
||||
blacklisted = true;
|
||||
{
|
||||
if (Environment.TickCount > (m_blacklistedurls[httpserver] + blacklistTimeout))
|
||||
{
|
||||
m_log.DebugFormat("[WORLDMAP]: Unblock blacklisted URL {0}", httpserver);
|
||||
|
||||
m_blacklistedurls.Remove(httpserver);
|
||||
}
|
||||
else
|
||||
blacklisted = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Can't find the http server
|
||||
@@ -682,7 +777,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
mapitemsrequest.ContentLength = buffer.Length; //Count bytes to send
|
||||
os = mapitemsrequest.GetRequestStream();
|
||||
os.Write(buffer, 0, buffer.Length); //Send it
|
||||
os.Close();
|
||||
//m_log.DebugFormat("[WORLD MAP]: Getting MapItems from {0}", httpserver);
|
||||
}
|
||||
catch (WebException ex)
|
||||
@@ -705,6 +799,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
responseMap["connect"] = OSD.FromBoolean(false);
|
||||
return responseMap;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (os != null)
|
||||
os.Close();
|
||||
}
|
||||
|
||||
string response_mapItems_reply = null;
|
||||
{ // get the response
|
||||
@@ -1060,6 +1159,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
|
||||
Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart);
|
||||
|
||||
// Service 6 (MAP_ITEM_AGENTS_LOCATION; green dots)
|
||||
|
||||
OSDMap responsemap = new OSDMap();
|
||||
int tc = Environment.TickCount;
|
||||
if (m_scene.GetRootAgentCount() == 0)
|
||||
@@ -1092,6 +1193,60 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
});
|
||||
responsemap["6"] = responsearr;
|
||||
}
|
||||
|
||||
// Service 7 (MAP_ITEM_LAND_FOR_SALE)
|
||||
|
||||
ILandChannel landChannel = m_scene.LandChannel;
|
||||
List<ILandObject> parcels = landChannel.AllParcels();
|
||||
|
||||
if ((parcels == null) || (parcels.Count == 0))
|
||||
{
|
||||
OSDMap responsemapdata = new OSDMap();
|
||||
responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1));
|
||||
responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1));
|
||||
responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
|
||||
responsemapdata["Name"] = OSD.FromString("");
|
||||
responsemapdata["Extra"] = OSD.FromInteger(0);
|
||||
responsemapdata["Extra2"] = OSD.FromInteger(0);
|
||||
OSDArray responsearr = new OSDArray();
|
||||
responsearr.Add(responsemapdata);
|
||||
|
||||
responsemap["7"] = responsearr;
|
||||
}
|
||||
else
|
||||
{
|
||||
OSDArray responsearr = new OSDArray(m_scene.GetRootAgentCount());
|
||||
foreach (ILandObject parcel_interface in parcels)
|
||||
{
|
||||
// Play it safe
|
||||
if (!(parcel_interface is LandObject))
|
||||
continue;
|
||||
|
||||
LandObject land = (LandObject)parcel_interface;
|
||||
LandData parcel = land.LandData;
|
||||
|
||||
// Show land for sale
|
||||
if ((parcel.Flags & (uint)ParcelFlags.ForSale) == (uint)ParcelFlags.ForSale)
|
||||
{
|
||||
Vector3 min = parcel.AABBMin;
|
||||
Vector3 max = parcel.AABBMax;
|
||||
float x = (min.X+max.X)/2;
|
||||
float y = (min.Y+max.Y)/2;
|
||||
|
||||
OSDMap responsemapdata = new OSDMap();
|
||||
responsemapdata["X"] = OSD.FromInteger((int)(xstart + x));
|
||||
responsemapdata["Y"] = OSD.FromInteger((int)(ystart + y));
|
||||
// responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y));
|
||||
responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
|
||||
responsemapdata["Name"] = OSD.FromString(parcel.Name);
|
||||
responsemapdata["Extra"] = OSD.FromInteger(parcel.Area);
|
||||
responsemapdata["Extra2"] = OSD.FromInteger(parcel.SalePrice);
|
||||
responsearr.Add(responsemapdata);
|
||||
}
|
||||
}
|
||||
responsemap["7"] = responsearr;
|
||||
}
|
||||
|
||||
return responsemap;
|
||||
}
|
||||
|
||||
@@ -1110,14 +1265,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID;
|
||||
|
||||
m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE");
|
||||
|
||||
m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random();
|
||||
UUID terrainImageID = UUID.Random();
|
||||
|
||||
AssetBase asset = new AssetBase(
|
||||
m_scene.RegionInfo.RegionSettings.TerrainImageID,
|
||||
terrainImageID,
|
||||
"terrainImage_" + m_scene.RegionInfo.RegionID.ToString(),
|
||||
(sbyte)AssetType.Texture,
|
||||
m_scene.RegionInfo.RegionID.ToString());
|
||||
@@ -1129,6 +1282,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
// Store the new one
|
||||
m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID);
|
||||
m_scene.AssetService.Store(asset);
|
||||
|
||||
// Switch to the new one
|
||||
UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID;
|
||||
m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID;
|
||||
m_scene.RegionInfo.RegionSettings.Save();
|
||||
|
||||
// Delete the old one
|
||||
@@ -1138,12 +1295,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
|
||||
private void MakeRootAgent(ScenePresence avatar)
|
||||
{
|
||||
// You may ask, why this is in a threadpool to start with..
|
||||
// The reason is so we don't cause the thread to freeze waiting
|
||||
// for the 1 second it costs to start a thread manually.
|
||||
if (!threadrunning)
|
||||
Util.FireAndForget(this.StartThread);
|
||||
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
if (!m_rootAgents.Contains(avatar.UUID))
|
||||
@@ -1158,8 +1309,30 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
m_rootAgents.Remove(avatar.UUID);
|
||||
if (m_rootAgents.Count == 0)
|
||||
StopThread();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnRegionUp(GridRegion otherRegion)
|
||||
{
|
||||
ulong regionhandle = otherRegion.RegionHandle;
|
||||
string httpserver = otherRegion.ServerURI + "MAP/MapItems/" + regionhandle.ToString();
|
||||
|
||||
lock (m_blacklistedregions)
|
||||
{
|
||||
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
||||
m_blacklistedregions.Remove(regionhandle);
|
||||
}
|
||||
|
||||
lock (m_blacklistedurls)
|
||||
{
|
||||
if (m_blacklistedurls.ContainsKey(httpserver))
|
||||
m_blacklistedurls.Remove(httpserver);
|
||||
}
|
||||
|
||||
lock (m_cachedRegionMapItemsAddress)
|
||||
{
|
||||
if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle))
|
||||
m_cachedRegionMapItemsAddress.Remove(regionhandle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user