diff options
author | Tom | 2011-09-04 07:06:36 -0700 |
---|---|---|
committer | Tom | 2011-09-04 07:06:36 -0700 |
commit | 66dec3b8742eff04fbbcc6e3249fe4ba87986500 (patch) | |
tree | 76cc708a821d35fac5cdbbce2de304b47064e732 /OpenSim/Region/CoreModules/World | |
parent | Guard another nullref (diff) | |
parent | Fixed BulletSim config files for Linux *.so libraries. (diff) | |
download | opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.zip opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.gz opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.bz2 opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.xz |
Resolve merge commits, stage 1
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
16 files changed, 321 insertions, 136 deletions
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs index c355b13..2399134 100644 --- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs +++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs | |||
@@ -129,14 +129,12 @@ namespace OpenSim.Region.CoreModules.World | |||
129 | switch (cmd[1]) | 129 | switch (cmd[1]) |
130 | { | 130 | { |
131 | case "enable": | 131 | case "enable": |
132 | if (scene.LoginsDisabled) | ||
133 | MainConsole.Instance.Output(String.Format("Enabling logins for region {0}", scene.RegionInfo.RegionName)); | ||
134 | scene.LoginsDisabled = false; | 132 | scene.LoginsDisabled = false; |
133 | MainConsole.Instance.Output(String.Format("Logins are enabled for region {0}", scene.RegionInfo.RegionName)); | ||
135 | break; | 134 | break; |
136 | case "disable": | 135 | case "disable": |
137 | if (!scene.LoginsDisabled) | ||
138 | MainConsole.Instance.Output(String.Format("Disabling logins for region {0}", scene.RegionInfo.RegionName)); | ||
139 | scene.LoginsDisabled = true; | 136 | scene.LoginsDisabled = true; |
137 | MainConsole.Instance.Output(String.Format("Logins are disabled for region {0}", scene.RegionInfo.RegionName)); | ||
140 | break; | 138 | break; |
141 | case "status": | 139 | case "status": |
142 | if (scene.LoginsDisabled) | 140 | if (scene.LoginsDisabled) |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 6ba3459..b185d9b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -68,8 +68,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
68 | SerialiserModule serialiserModule = new SerialiserModule(); | 68 | SerialiserModule serialiserModule = new SerialiserModule(); |
69 | TerrainModule terrainModule = new TerrainModule(); | 69 | TerrainModule terrainModule = new TerrainModule(); |
70 | 70 | ||
71 | m_scene = SceneSetupHelpers.SetupScene(); | 71 | m_scene = SceneHelpers.SetupScene(); |
72 | SceneSetupHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule); | 72 | SceneHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule); |
73 | } | 73 | } |
74 | 74 | ||
75 | private void LoadCompleted(Guid requestId, string errorMessage) | 75 | private void LoadCompleted(Guid requestId, string errorMessage) |
@@ -125,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
125 | [Test] | 125 | [Test] |
126 | public void TestSaveOar() | 126 | public void TestSaveOar() |
127 | { | 127 | { |
128 | TestHelper.InMethod(); | 128 | TestHelpers.InMethod(); |
129 | // log4net.Config.XmlConfigurator.Configure(); | 129 | // log4net.Config.XmlConfigurator.Configure(); |
130 | 130 | ||
131 | SceneObjectPart part1 = CreateSceneObjectPart1(); | 131 | SceneObjectPart part1 = CreateSceneObjectPart1(); |
@@ -217,7 +217,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
217 | [Test] | 217 | [Test] |
218 | public void TestSaveOarNoAssets() | 218 | public void TestSaveOarNoAssets() |
219 | { | 219 | { |
220 | TestHelper.InMethod(); | 220 | TestHelpers.InMethod(); |
221 | // log4net.Config.XmlConfigurator.Configure(); | 221 | // log4net.Config.XmlConfigurator.Configure(); |
222 | 222 | ||
223 | SceneObjectPart part1 = CreateSceneObjectPart1(); | 223 | SceneObjectPart part1 = CreateSceneObjectPart1(); |
@@ -300,7 +300,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
300 | [Test] | 300 | [Test] |
301 | public void TestLoadOar() | 301 | public void TestLoadOar() |
302 | { | 302 | { |
303 | TestHelper.InMethod(); | 303 | TestHelpers.InMethod(); |
304 | // log4net.Config.XmlConfigurator.Configure(); | 304 | // log4net.Config.XmlConfigurator.Configure(); |
305 | 305 | ||
306 | MemoryStream archiveWriteStream = new MemoryStream(); | 306 | MemoryStream archiveWriteStream = new MemoryStream(); |
@@ -409,7 +409,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
409 | [Test] | 409 | [Test] |
410 | public void TestLoadOarRegionSettings() | 410 | public void TestLoadOarRegionSettings() |
411 | { | 411 | { |
412 | TestHelper.InMethod(); | 412 | TestHelpers.InMethod(); |
413 | //log4net.Config.XmlConfigurator.Configure(); | 413 | //log4net.Config.XmlConfigurator.Configure(); |
414 | 414 | ||
415 | MemoryStream archiveWriteStream = new MemoryStream(); | 415 | MemoryStream archiveWriteStream = new MemoryStream(); |
@@ -505,7 +505,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
505 | //[Test] | 505 | //[Test] |
506 | public void TestMergeOar() | 506 | public void TestMergeOar() |
507 | { | 507 | { |
508 | TestHelper.InMethod(); | 508 | TestHelpers.InMethod(); |
509 | //XmlConfigurator.Configure(); | 509 | //XmlConfigurator.Configure(); |
510 | 510 | ||
511 | MemoryStream archiveWriteStream = new MemoryStream(); | 511 | MemoryStream archiveWriteStream = new MemoryStream(); |
@@ -524,8 +524,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
524 | SerialiserModule serialiserModule = new SerialiserModule(); | 524 | SerialiserModule serialiserModule = new SerialiserModule(); |
525 | TerrainModule terrainModule = new TerrainModule(); | 525 | TerrainModule terrainModule = new TerrainModule(); |
526 | 526 | ||
527 | Scene scene = SceneSetupHelpers.SetupScene(); | 527 | Scene scene = SceneHelpers.SetupScene(); |
528 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); | 528 | SceneHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); |
529 | 529 | ||
530 | m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); | 530 | m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); |
531 | 531 | ||
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index b96f300..fb32288 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -875,41 +875,35 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
875 | SceneObjectPart prt = Scene.GetSceneObjectPart(obj); | 875 | SceneObjectPart prt = Scene.GetSceneObjectPart(obj); |
876 | if (prt != null) | 876 | if (prt != null) |
877 | { | 877 | { |
878 | if (prt.ParentGroup != null) | 878 | SceneObjectGroup sog = prt.ParentGroup; |
879 | LandStatReportItem lsri = new LandStatReportItem(); | ||
880 | lsri.LocationX = sog.AbsolutePosition.X; | ||
881 | lsri.LocationY = sog.AbsolutePosition.Y; | ||
882 | lsri.LocationZ = sog.AbsolutePosition.Z; | ||
883 | lsri.Score = SceneData[obj]; | ||
884 | lsri.TaskID = sog.UUID; | ||
885 | lsri.TaskLocalID = sog.LocalId; | ||
886 | lsri.TaskName = sog.GetPartName(obj); | ||
887 | lsri.OwnerName = "waiting"; | ||
888 | lock (uuidNameLookupList) | ||
889 | uuidNameLookupList.Add(sog.OwnerID); | ||
890 | |||
891 | if (filter.Length != 0) | ||
879 | { | 892 | { |
880 | SceneObjectGroup sog = prt.ParentGroup; | 893 | if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter))) |
881 | if (sog != null) | ||
882 | { | 894 | { |
883 | LandStatReportItem lsri = new LandStatReportItem(); | 895 | } |
884 | lsri.LocationX = sog.AbsolutePosition.X; | 896 | else |
885 | lsri.LocationY = sog.AbsolutePosition.Y; | 897 | { |
886 | lsri.LocationZ = sog.AbsolutePosition.Z; | 898 | continue; |
887 | lsri.Score = SceneData[obj]; | ||
888 | lsri.TaskID = sog.UUID; | ||
889 | lsri.TaskLocalID = sog.LocalId; | ||
890 | lsri.TaskName = sog.GetPartName(obj); | ||
891 | lsri.OwnerName = "waiting"; | ||
892 | lock (uuidNameLookupList) | ||
893 | uuidNameLookupList.Add(sog.OwnerID); | ||
894 | |||
895 | if (filter.Length != 0) | ||
896 | { | ||
897 | if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter))) | ||
898 | { | ||
899 | } | ||
900 | else | ||
901 | { | ||
902 | continue; | ||
903 | } | ||
904 | } | ||
905 | |||
906 | SceneReport.Add(lsri); | ||
907 | } | 899 | } |
908 | } | 900 | } |
909 | } | ||
910 | 901 | ||
902 | SceneReport.Add(lsri); | ||
903 | } | ||
911 | } | 904 | } |
912 | } | 905 | } |
906 | |||
913 | remoteClient.SendLandStatReply(reportType, requestFlags, (uint)SceneReport.Count,SceneReport.ToArray()); | 907 | remoteClient.SendLandStatReply(reportType, requestFlags, (uint)SceneReport.Count,SceneReport.ToArray()); |
914 | 908 | ||
915 | if (uuidNameLookupList.Count > 0) | 909 | if (uuidNameLookupList.Count > 0) |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 4e7c76f..a3066e7 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -423,17 +423,49 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
423 | SendLandUpdate(avatar, false); | 423 | SendLandUpdate(avatar, false); |
424 | } | 424 | } |
425 | 425 | ||
426 | public void EventManagerOnSignificantClientMovement(IClientAPI remote_client) | 426 | public void EventManagerOnSignificantClientMovement(ScenePresence clientAvatar) |
427 | { | 427 | { |
428 | ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId); | 428 | SendLandUpdate(clientAvatar); |
429 | 429 | SendOutNearestBanLine(clientAvatar.ControllingClient); | |
430 | if (clientAvatar != null) | 430 | ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y); |
431 | if (parcel != null) | ||
431 | { | 432 | { |
432 | SendLandUpdate(clientAvatar); | 433 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && |
433 | SendOutNearestBanLine(remote_client); | 434 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) |
434 | ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y); | 435 | { |
435 | if (parcel != null) | 436 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, |
436 | EnforceBans(parcel, clientAvatar); | 437 | m_scene.RegionInfo.RegionID); |
438 | //They are going under the safety line! | ||
439 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) | ||
440 | { | ||
441 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false; | ||
442 | } | ||
443 | } | ||
444 | else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && | ||
445 | parcel.IsBannedFromLand(clientAvatar.UUID)) | ||
446 | { | ||
447 | //once we've sent the message once, keep going toward the target until we are done | ||
448 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) | ||
449 | { | ||
450 | SendYouAreBannedNotice(clientAvatar); | ||
451 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | ||
452 | } | ||
453 | } | ||
454 | else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) | ||
455 | { | ||
456 | //once we've sent the message once, keep going toward the target until we are done | ||
457 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) | ||
458 | { | ||
459 | SendYouAreRestrictedNotice(clientAvatar); | ||
460 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | ||
461 | } | ||
462 | } | ||
463 | else | ||
464 | { | ||
465 | //when we are finally in a safe place, lets release the forced position lock | ||
466 | forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); | ||
467 | } | ||
468 | EnforceBans(parcel, clientAvatar); | ||
437 | } | 469 | } |
438 | } | 470 | } |
439 | 471 | ||
@@ -665,7 +697,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
665 | // Corner case. If an autoreturn happens during sim startup | 697 | // Corner case. If an autoreturn happens during sim startup |
666 | // we will come here with the list uninitialized | 698 | // we will come here with the list uninitialized |
667 | // | 699 | // |
668 | int landId = m_landIDList[x, y]; | 700 | // int landId = m_landIDList[x, y]; |
669 | 701 | ||
670 | // if (landId == 0) | 702 | // if (landId == 0) |
671 | // m_log.DebugFormat( | 703 | // m_log.DebugFormat( |
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs index f466194..5122734 100644 --- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
51 | 51 | ||
52 | public class PrimCountModule : IPrimCountModule, INonSharedRegionModule | 52 | public class PrimCountModule : IPrimCountModule, INonSharedRegionModule |
53 | { | 53 | { |
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | private Scene m_Scene; | 56 | private Scene m_Scene; |
57 | private Dictionary<UUID, PrimCounts> m_PrimCounts = | 57 | private Dictionary<UUID, PrimCounts> m_PrimCounts = |
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs index a3aa38d..e553ffa 100644 --- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | |||
@@ -64,8 +64,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
64 | { | 64 | { |
65 | m_pcm = new PrimCountModule(); | 65 | m_pcm = new PrimCountModule(); |
66 | LandManagementModule lmm = new LandManagementModule(); | 66 | LandManagementModule lmm = new LandManagementModule(); |
67 | m_scene = SceneSetupHelpers.SetupScene(); | 67 | m_scene = SceneHelpers.SetupScene(); |
68 | SceneSetupHelpers.SetupSceneModules(m_scene, lmm, m_pcm); | 68 | SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm); |
69 | 69 | ||
70 | int xParcelDivider = (int)Constants.RegionSize - 1; | 70 | int xParcelDivider = (int)Constants.RegionSize - 1; |
71 | 71 | ||
@@ -106,12 +106,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
106 | [Test] | 106 | [Test] |
107 | public void TestAddOwnerObject() | 107 | public void TestAddOwnerObject() |
108 | { | 108 | { |
109 | TestHelper.InMethod(); | 109 | TestHelpers.InMethod(); |
110 | // log4net.Config.XmlConfigurator.Configure(); | 110 | // log4net.Config.XmlConfigurator.Configure(); |
111 | 111 | ||
112 | IPrimCounts pc = m_lo.PrimCounts; | 112 | IPrimCounts pc = m_lo.PrimCounts; |
113 | 113 | ||
114 | SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01); | 114 | SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); |
115 | m_scene.AddNewSceneObject(sog, false); | 115 | m_scene.AddNewSceneObject(sog, false); |
116 | 116 | ||
117 | Assert.That(pc.Owner, Is.EqualTo(3)); | 117 | Assert.That(pc.Owner, Is.EqualTo(3)); |
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
124 | Assert.That(pc.Simulator, Is.EqualTo(3)); | 124 | Assert.That(pc.Simulator, Is.EqualTo(3)); |
125 | 125 | ||
126 | // Add a second object and retest | 126 | // Add a second object and retest |
127 | SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10); | 127 | SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10); |
128 | m_scene.AddNewSceneObject(sog2, false); | 128 | m_scene.AddNewSceneObject(sog2, false); |
129 | 129 | ||
130 | Assert.That(pc.Owner, Is.EqualTo(5)); | 130 | Assert.That(pc.Owner, Is.EqualTo(5)); |
@@ -143,12 +143,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
143 | [Test] | 143 | [Test] |
144 | public void TestCopyOwnerObject() | 144 | public void TestCopyOwnerObject() |
145 | { | 145 | { |
146 | TestHelper.InMethod(); | 146 | TestHelpers.InMethod(); |
147 | // log4net.Config.XmlConfigurator.Configure(); | 147 | // log4net.Config.XmlConfigurator.Configure(); |
148 | 148 | ||
149 | IPrimCounts pc = m_lo.PrimCounts; | 149 | IPrimCounts pc = m_lo.PrimCounts; |
150 | 150 | ||
151 | SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01); | 151 | SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); |
152 | m_scene.AddNewSceneObject(sog, false); | 152 | m_scene.AddNewSceneObject(sog, false); |
153 | m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity); | 153 | m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity); |
154 | 154 | ||
@@ -169,12 +169,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
169 | [Test] | 169 | [Test] |
170 | public void TestMoveOwnerObject() | 170 | public void TestMoveOwnerObject() |
171 | { | 171 | { |
172 | TestHelper.InMethod(); | 172 | TestHelpers.InMethod(); |
173 | // log4net.Config.XmlConfigurator.Configure(); | 173 | // log4net.Config.XmlConfigurator.Configure(); |
174 | 174 | ||
175 | SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01); | 175 | SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); |
176 | m_scene.AddNewSceneObject(sog, false); | 176 | m_scene.AddNewSceneObject(sog, false); |
177 | SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10); | 177 | SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10); |
178 | m_scene.AddNewSceneObject(sog2, false); | 178 | m_scene.AddNewSceneObject(sog2, false); |
179 | 179 | ||
180 | // Move the first scene object to the eastern strip parcel | 180 | // Move the first scene object to the eastern strip parcel |
@@ -230,13 +230,13 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
230 | [Test] | 230 | [Test] |
231 | public void TestRemoveOwnerObject() | 231 | public void TestRemoveOwnerObject() |
232 | { | 232 | { |
233 | TestHelper.InMethod(); | 233 | TestHelpers.InMethod(); |
234 | // log4net.Config.XmlConfigurator.Configure(); | 234 | // log4net.Config.XmlConfigurator.Configure(); |
235 | 235 | ||
236 | IPrimCounts pc = m_lo.PrimCounts; | 236 | IPrimCounts pc = m_lo.PrimCounts; |
237 | 237 | ||
238 | m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false); | 238 | m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false); |
239 | SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, "b", 0x10); | 239 | SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10); |
240 | m_scene.AddNewSceneObject(sogToDelete, false); | 240 | m_scene.AddNewSceneObject(sogToDelete, false); |
241 | m_scene.DeleteSceneObject(sogToDelete, false); | 241 | m_scene.DeleteSceneObject(sogToDelete, false); |
242 | 242 | ||
@@ -253,14 +253,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
253 | [Test] | 253 | [Test] |
254 | public void TestAddGroupObject() | 254 | public void TestAddGroupObject() |
255 | { | 255 | { |
256 | TestHelper.InMethod(); | 256 | TestHelpers.InMethod(); |
257 | // log4net.Config.XmlConfigurator.Configure(); | 257 | // log4net.Config.XmlConfigurator.Configure(); |
258 | 258 | ||
259 | m_lo.DeedToGroup(m_groupId); | 259 | m_lo.DeedToGroup(m_groupId); |
260 | 260 | ||
261 | IPrimCounts pc = m_lo.PrimCounts; | 261 | IPrimCounts pc = m_lo.PrimCounts; |
262 | 262 | ||
263 | SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01); | 263 | SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01); |
264 | sog.GroupID = m_groupId; | 264 | sog.GroupID = m_groupId; |
265 | m_scene.AddNewSceneObject(sog, false); | 265 | m_scene.AddNewSceneObject(sog, false); |
266 | 266 | ||
@@ -284,18 +284,18 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
284 | [Test] | 284 | [Test] |
285 | public void TestRemoveGroupObject() | 285 | public void TestRemoveGroupObject() |
286 | { | 286 | { |
287 | TestHelper.InMethod(); | 287 | TestHelpers.InMethod(); |
288 | // log4net.Config.XmlConfigurator.Configure(); | 288 | // log4net.Config.XmlConfigurator.Configure(); |
289 | 289 | ||
290 | m_lo.DeedToGroup(m_groupId); | 290 | m_lo.DeedToGroup(m_groupId); |
291 | 291 | ||
292 | IPrimCounts pc = m_lo.PrimCounts; | 292 | IPrimCounts pc = m_lo.PrimCounts; |
293 | 293 | ||
294 | SceneObjectGroup sogToKeep = SceneSetupHelpers.CreateSceneObject(1, m_userId, "a", 0x1); | 294 | SceneObjectGroup sogToKeep = SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1); |
295 | sogToKeep.GroupID = m_groupId; | 295 | sogToKeep.GroupID = m_groupId; |
296 | m_scene.AddNewSceneObject(sogToKeep, false); | 296 | m_scene.AddNewSceneObject(sogToKeep, false); |
297 | 297 | ||
298 | SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, "b", 0x10); | 298 | SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10); |
299 | m_scene.AddNewSceneObject(sogToDelete, false); | 299 | m_scene.AddNewSceneObject(sogToDelete, false); |
300 | m_scene.DeleteSceneObject(sogToDelete, false); | 300 | m_scene.DeleteSceneObject(sogToDelete, false); |
301 | 301 | ||
@@ -313,12 +313,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
313 | [Test] | 313 | [Test] |
314 | public void TestAddOthersObject() | 314 | public void TestAddOthersObject() |
315 | { | 315 | { |
316 | TestHelper.InMethod(); | 316 | TestHelpers.InMethod(); |
317 | // log4net.Config.XmlConfigurator.Configure(); | 317 | // log4net.Config.XmlConfigurator.Configure(); |
318 | 318 | ||
319 | IPrimCounts pc = m_lo.PrimCounts; | 319 | IPrimCounts pc = m_lo.PrimCounts; |
320 | 320 | ||
321 | SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01); | 321 | SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01); |
322 | m_scene.AddNewSceneObject(sog, false); | 322 | m_scene.AddNewSceneObject(sog, false); |
323 | 323 | ||
324 | Assert.That(pc.Owner, Is.EqualTo(0)); | 324 | Assert.That(pc.Owner, Is.EqualTo(0)); |
@@ -334,13 +334,13 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
334 | [Test] | 334 | [Test] |
335 | public void TestRemoveOthersObject() | 335 | public void TestRemoveOthersObject() |
336 | { | 336 | { |
337 | TestHelper.InMethod(); | 337 | TestHelpers.InMethod(); |
338 | // log4net.Config.XmlConfigurator.Configure(); | 338 | // log4net.Config.XmlConfigurator.Configure(); |
339 | 339 | ||
340 | IPrimCounts pc = m_lo.PrimCounts; | 340 | IPrimCounts pc = m_lo.PrimCounts; |
341 | 341 | ||
342 | m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false); | 342 | m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false); |
343 | SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10); | 343 | SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10); |
344 | m_scene.AddNewSceneObject(sogToDelete, false); | 344 | m_scene.AddNewSceneObject(sogToDelete, false); |
345 | m_scene.DeleteSceneObject(sogToDelete, false); | 345 | m_scene.DeleteSceneObject(sogToDelete, false); |
346 | 346 | ||
@@ -360,10 +360,10 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
360 | [Test] | 360 | [Test] |
361 | public void TestTaint() | 361 | public void TestTaint() |
362 | { | 362 | { |
363 | TestHelper.InMethod(); | 363 | TestHelpers.InMethod(); |
364 | IPrimCounts pc = m_lo.PrimCounts; | 364 | IPrimCounts pc = m_lo.PrimCounts; |
365 | 365 | ||
366 | SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01); | 366 | SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); |
367 | m_scene.AddNewSceneObject(sog, false); | 367 | m_scene.AddNewSceneObject(sog, false); |
368 | 368 | ||
369 | m_pcm.TaintPrimCount(); | 369 | m_pcm.TaintPrimCount(); |
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs index aa14054..1d2141e 100644 --- a/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs | |||
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap | |||
173 | private Bitmap fetchTexture(UUID id) | 173 | private Bitmap fetchTexture(UUID id) |
174 | { | 174 | { |
175 | AssetBase asset = m_scene.AssetService.Get(id.ToString()); | 175 | AssetBase asset = m_scene.AssetService.Get(id.ToString()); |
176 | m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null); | 176 | m_log.DebugFormat("[TexturedMapTileRenderer]: Fetched texture {0}, found: {1}", id, asset != null); |
177 | if (asset == null) return null; | 177 | if (asset == null) return null; |
178 | 178 | ||
179 | ManagedImage managedImage; | 179 | ManagedImage managedImage; |
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs index d5b7082..4326606 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs | |||
@@ -53,17 +53,17 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests | |||
53 | public void SetUp() | 53 | public void SetUp() |
54 | { | 54 | { |
55 | m_module = new MoapModule(); | 55 | m_module = new MoapModule(); |
56 | m_scene = SceneSetupHelpers.SetupScene(); | 56 | m_scene = SceneHelpers.SetupScene(); |
57 | SceneSetupHelpers.SetupSceneModules(m_scene, m_module); | 57 | SceneHelpers.SetupSceneModules(m_scene, m_module); |
58 | } | 58 | } |
59 | 59 | ||
60 | [Test] | 60 | [Test] |
61 | public void TestClearMediaUrl() | 61 | public void TestClearMediaUrl() |
62 | { | 62 | { |
63 | TestHelper.InMethod(); | 63 | TestHelpers.InMethod(); |
64 | // log4net.Config.XmlConfigurator.Configure(); | 64 | // log4net.Config.XmlConfigurator.Configure(); |
65 | 65 | ||
66 | SceneObjectPart part = SceneSetupHelpers.AddSceneObject(m_scene); | 66 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene); |
67 | MediaEntry me = new MediaEntry(); | 67 | MediaEntry me = new MediaEntry(); |
68 | 68 | ||
69 | m_module.SetMediaEntry(part, 1, me); | 69 | m_module.SetMediaEntry(part, 1, me); |
@@ -84,11 +84,11 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests | |||
84 | [Test] | 84 | [Test] |
85 | public void TestSetMediaUrl() | 85 | public void TestSetMediaUrl() |
86 | { | 86 | { |
87 | TestHelper.InMethod(); | 87 | TestHelpers.InMethod(); |
88 | 88 | ||
89 | string homeUrl = "opensimulator.org"; | 89 | string homeUrl = "opensimulator.org"; |
90 | 90 | ||
91 | SceneObjectPart part = SceneSetupHelpers.AddSceneObject(m_scene); | 91 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene); |
92 | MediaEntry me = new MediaEntry() { HomeURL = homeUrl }; | 92 | MediaEntry me = new MediaEntry() { HomeURL = homeUrl }; |
93 | 93 | ||
94 | m_module.SetMediaEntry(part, 1, me); | 94 | m_module.SetMediaEntry(part, 1, me); |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 516189f..49e3236 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) | 85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) |
86 | { | 86 | { |
87 | SceneObjectPart part = m_scene.GetSceneObjectPart(localID); | 87 | SceneObjectPart part = m_scene.GetSceneObjectPart(localID); |
88 | if (part == null || part.ParentGroup == null) | 88 | if (part == null) |
89 | return; | 89 | return; |
90 | 90 | ||
91 | if (part.ParentGroup.IsDeleted) | 91 | if (part.ParentGroup.IsDeleted) |
@@ -111,9 +111,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
111 | if (part == null) | 111 | if (part == null) |
112 | return false; | 112 | return false; |
113 | 113 | ||
114 | if (part.ParentGroup == null) | ||
115 | return false; | ||
116 | |||
117 | SceneObjectGroup group = part.ParentGroup; | 114 | SceneObjectGroup group = part.ParentGroup; |
118 | 115 | ||
119 | switch (saleType) | 116 | switch (saleType) |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 2c7843f..afb641f 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
146 | = ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors); | 146 | = ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors); |
147 | 147 | ||
148 | if (m_bypassPermissions) | 148 | if (m_bypassPermissions) |
149 | m_log.Info("[PERMISSIONS]: serviceside_object_permissions = false in ini file so disabling all region service permission checks"); | 149 | m_log.Info("[PERMISSIONS]: serverside_object_permissions = false in ini file so disabling all region service permission checks"); |
150 | else | 150 | else |
151 | m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks"); | 151 | m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks"); |
152 | 152 | ||
@@ -1131,7 +1131,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1131 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); | 1131 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); |
1132 | if (part.OwnerID != moverID) | 1132 | if (part.OwnerID != moverID) |
1133 | { | 1133 | { |
1134 | if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) | 1134 | if (!part.ParentGroup.IsDeleted) |
1135 | { | 1135 | { |
1136 | if (part.ParentGroup.IsAttachment) | 1136 | if (part.ParentGroup.IsAttachment) |
1137 | return false; | 1137 | return false; |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index 4f752ab..d5b585a 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs | |||
@@ -236,14 +236,14 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
236 | public void Init() | 236 | public void Init() |
237 | { | 237 | { |
238 | m_serialiserModule = new SerialiserModule(); | 238 | m_serialiserModule = new SerialiserModule(); |
239 | m_scene = SceneSetupHelpers.SetupScene(); | 239 | m_scene = SceneHelpers.SetupScene(); |
240 | SceneSetupHelpers.SetupSceneModules(m_scene, m_serialiserModule); | 240 | SceneHelpers.SetupSceneModules(m_scene, m_serialiserModule); |
241 | } | 241 | } |
242 | 242 | ||
243 | [Test] | 243 | [Test] |
244 | public void TestDeserializeXml() | 244 | public void TestDeserializeXml() |
245 | { | 245 | { |
246 | TestHelper.InMethod(); | 246 | TestHelpers.InMethod(); |
247 | //log4net.Config.XmlConfigurator.Configure(); | 247 | //log4net.Config.XmlConfigurator.Configure(); |
248 | 248 | ||
249 | SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(xml); | 249 | SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(xml); |
@@ -259,7 +259,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
259 | [Test] | 259 | [Test] |
260 | public void TestSerializeXml() | 260 | public void TestSerializeXml() |
261 | { | 261 | { |
262 | TestHelper.InMethod(); | 262 | TestHelpers.InMethod(); |
263 | //log4net.Config.XmlConfigurator.Configure(); | 263 | //log4net.Config.XmlConfigurator.Configure(); |
264 | 264 | ||
265 | string rpName = "My Little Donkey"; | 265 | string rpName = "My Little Donkey"; |
@@ -334,7 +334,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
334 | [Test] | 334 | [Test] |
335 | public void TestDeserializeXml2() | 335 | public void TestDeserializeXml2() |
336 | { | 336 | { |
337 | TestHelper.InMethod(); | 337 | TestHelpers.InMethod(); |
338 | //log4net.Config.XmlConfigurator.Configure(); | 338 | //log4net.Config.XmlConfigurator.Configure(); |
339 | 339 | ||
340 | SceneObjectGroup so = m_serialiserModule.DeserializeGroupFromXml2(xml2); | 340 | SceneObjectGroup so = m_serialiserModule.DeserializeGroupFromXml2(xml2); |
@@ -350,7 +350,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
350 | [Test] | 350 | [Test] |
351 | public void TestSerializeXml2() | 351 | public void TestSerializeXml2() |
352 | { | 352 | { |
353 | TestHelper.InMethod(); | 353 | TestHelpers.InMethod(); |
354 | //log4net.Config.XmlConfigurator.Configure(); | 354 | //log4net.Config.XmlConfigurator.Configure(); |
355 | 355 | ||
356 | string rpName = "My Little Pony"; | 356 | string rpName = "My Little Pony"; |
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 09c0ebb..22ffcd6 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
81 | 81 | ||
82 | if (grp.IsAttachment) | 82 | if (grp.IsAttachment) |
83 | { | 83 | { |
84 | if (grp.GetAttachmentPoint() > 30) // HUD | 84 | if (grp.AttachmentPoint > 30) // HUD |
85 | { | 85 | { |
86 | if (sp.ControllingClient.AgentId != grp.OwnerID) | 86 | if (sp.ControllingClient.AgentId != grp.OwnerID) |
87 | return; | 87 | return; |
@@ -115,7 +115,7 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
115 | { | 115 | { |
116 | SceneObjectGroup grp = part.ParentGroup; | 116 | SceneObjectGroup grp = part.ParentGroup; |
117 | 117 | ||
118 | if (grp.IsAttachment && grp.GetAttachmentPoint() > 30) | 118 | if (grp.IsAttachment && grp.AttachmentPoint > 30) |
119 | { | 119 | { |
120 | objectID = ownerID; | 120 | objectID = ownerID; |
121 | parentID = ownerID; | 121 | parentID = ownerID; |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 2da6458..a93ffaa 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
84 | private ITerrainChannel m_revert; | 84 | private ITerrainChannel m_revert; |
85 | private Scene m_scene; | 85 | private Scene m_scene; |
86 | private volatile bool m_tainted; | 86 | private volatile bool m_tainted; |
87 | private readonly UndoStack<LandUndoState> m_undo = new UndoStack<LandUndoState>(5); | 87 | private readonly Stack<LandUndoState> m_undo = new Stack<LandUndoState>(5); |
88 | 88 | ||
89 | #region ICommandableModule Members | 89 | #region ICommandableModule Members |
90 | 90 | ||
diff --git a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs index c2ad7b8..ab8e1bf 100644 --- a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs +++ b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs | |||
@@ -100,15 +100,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Vegetation | |||
100 | { | 100 | { |
101 | case Tree.Cypress1: | 101 | case Tree.Cypress1: |
102 | case Tree.Cypress2: | 102 | case Tree.Cypress2: |
103 | tree.Scale = new Vector3(4, 4, 10); | 103 | tree.Scale *= new Vector3(8, 8, 20); |
104 | break; | 104 | break; |
105 | 105 | ||
106 | // case... other tree types | 106 | // case... other tree types |
107 | // tree.Scale = new Vector3(?, ?, ?); | 107 | // tree.Scale *= new Vector3(?, ?, ?); |
108 | // break; | 108 | // break; |
109 | 109 | ||
110 | default: | 110 | default: |
111 | tree.Scale = new Vector3(4, 4, 4); | 111 | tree.Scale *= new Vector3(8, 8, 8); |
112 | break; | 112 | break; |
113 | } | 113 | } |
114 | } | 114 | } |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index ced2773..c13e9c6 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -96,16 +96,7 @@ m_log.DebugFormat("MAP NAME=({0})", mapName); | |||
96 | 96 | ||
97 | // try to fetch from GridServer | 97 | // try to fetch from GridServer |
98 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); | 98 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); |
99 | if (regionInfos == null) | 99 | if (regionInfos.Count == 0) |
100 | { | ||
101 | m_log.Warn("[MAPSEARCHMODULE]: RequestNamedRegions returned null. Old gridserver?"); | ||
102 | // service wasn't available; maybe still an old GridServer. Try the old API, though it will return only one region | ||
103 | regionInfos = new List<GridRegion>(); | ||
104 | GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName); | ||
105 | if (info != null) | ||
106 | regionInfos.Add(info); | ||
107 | } | ||
108 | else if (regionInfos.Count == 0) | ||
109 | remoteClient.SendAlertMessage("Hyperlink could not be established."); | 100 | remoteClient.SendAlertMessage("Hyperlink could not be established."); |
110 | 101 | ||
111 | //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); | 102 | //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index ca5529d9..21e3ecb 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -46,6 +46,7 @@ using OpenSim.Framework.Servers; | |||
46 | using OpenSim.Framework.Servers.HttpServer; | 46 | using OpenSim.Framework.Servers.HttpServer; |
47 | using OpenSim.Region.Framework.Interfaces; | 47 | using OpenSim.Region.Framework.Interfaces; |
48 | using OpenSim.Region.Framework.Scenes; | 48 | using OpenSim.Region.Framework.Scenes; |
49 | using OpenSim.Region.CoreModules.World.Land; | ||
49 | using Caps=OpenSim.Framework.Capabilities.Caps; | 50 | using Caps=OpenSim.Framework.Capabilities.Caps; |
50 | using OSDArray=OpenMetaverse.StructuredData.OSDArray; | 51 | using OSDArray=OpenMetaverse.StructuredData.OSDArray; |
51 | using OSDMap=OpenMetaverse.StructuredData.OSDMap; | 52 | using OSDMap=OpenMetaverse.StructuredData.OSDMap; |
@@ -68,6 +69,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
68 | protected Scene m_scene; | 69 | protected Scene m_scene; |
69 | private List<MapBlockData> cachedMapBlocks = new List<MapBlockData>(); | 70 | private List<MapBlockData> cachedMapBlocks = new List<MapBlockData>(); |
70 | private int cachedTime = 0; | 71 | private int cachedTime = 0; |
72 | private int blacklistTimeout = 10*60*1000; // 10 minutes | ||
71 | private byte[] myMapImageJPEG; | 73 | private byte[] myMapImageJPEG; |
72 | protected volatile bool m_Enabled = false; | 74 | protected volatile bool m_Enabled = false; |
73 | private Dictionary<UUID, MapRequestState> m_openRequests = new Dictionary<UUID, MapRequestState>(); | 75 | private Dictionary<UUID, MapRequestState> m_openRequests = new Dictionary<UUID, MapRequestState>(); |
@@ -85,6 +87,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
85 | IConfig startupConfig = config.Configs["Startup"]; | 87 | IConfig startupConfig = config.Configs["Startup"]; |
86 | if (startupConfig.GetString("WorldMapModule", "WorldMap") == "WorldMap") | 88 | if (startupConfig.GetString("WorldMapModule", "WorldMap") == "WorldMap") |
87 | m_Enabled = true; | 89 | m_Enabled = true; |
90 | |||
91 | blacklistTimeout = startupConfig.GetInt("BlacklistTimeout", 10*60) * 1000; | ||
88 | } | 92 | } |
89 | 93 | ||
90 | public virtual void AddRegion (Scene scene) | 94 | public virtual void AddRegion (Scene scene) |
@@ -159,11 +163,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
159 | m_scene.EventManager.OnClientClosed += ClientLoggedOut; | 163 | m_scene.EventManager.OnClientClosed += ClientLoggedOut; |
160 | m_scene.EventManager.OnMakeChildAgent += MakeChildAgent; | 164 | m_scene.EventManager.OnMakeChildAgent += MakeChildAgent; |
161 | m_scene.EventManager.OnMakeRootAgent += MakeRootAgent; | 165 | m_scene.EventManager.OnMakeRootAgent += MakeRootAgent; |
166 | m_scene.EventManager.OnRegionUp += OnRegionUp; | ||
167 | |||
168 | StartThread(new object()); | ||
162 | } | 169 | } |
163 | 170 | ||
164 | // this has to be called with a lock on m_scene | 171 | // this has to be called with a lock on m_scene |
165 | protected virtual void RemoveHandlers() | 172 | protected virtual void RemoveHandlers() |
166 | { | 173 | { |
174 | StopThread(); | ||
175 | |||
176 | m_scene.EventManager.OnRegionUp -= OnRegionUp; | ||
167 | m_scene.EventManager.OnMakeRootAgent -= MakeRootAgent; | 177 | m_scene.EventManager.OnMakeRootAgent -= MakeRootAgent; |
168 | m_scene.EventManager.OnMakeChildAgent -= MakeChildAgent; | 178 | m_scene.EventManager.OnMakeChildAgent -= MakeChildAgent; |
169 | m_scene.EventManager.OnClientClosed -= ClientLoggedOut; | 179 | m_scene.EventManager.OnClientClosed -= ClientLoggedOut; |
@@ -279,7 +289,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
279 | /// <returns></returns> | 289 | /// <returns></returns> |
280 | public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) | 290 | public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) |
281 | { | 291 | { |
282 | m_log.Debug("[WORLD MAP]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName); | 292 | m_log.DebugFormat("[WORLD MAP]: MapLayer Request in region: {0}", m_scene.RegionInfo.RegionName); |
283 | LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); | 293 | LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); |
284 | mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); | 294 | mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); |
285 | return mapResponse; | 295 | return mapResponse; |
@@ -321,8 +331,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
321 | lock (m_rootAgents) | 331 | lock (m_rootAgents) |
322 | { | 332 | { |
323 | m_rootAgents.Remove(AgentId); | 333 | m_rootAgents.Remove(AgentId); |
324 | if (m_rootAgents.Count == 0) | ||
325 | StopThread(); | ||
326 | } | 334 | } |
327 | } | 335 | } |
328 | #endregion | 336 | #endregion |
@@ -362,6 +370,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
362 | public virtual void HandleMapItemRequest(IClientAPI remoteClient, uint flags, | 370 | public virtual void HandleMapItemRequest(IClientAPI remoteClient, uint flags, |
363 | uint EstateID, bool godlike, uint itemtype, ulong regionhandle) | 371 | uint EstateID, bool godlike, uint itemtype, ulong regionhandle) |
364 | { | 372 | { |
373 | // m_log.DebugFormat("[WORLD MAP]: Handle MapItem request {0} {1}", regionhandle, itemtype); | ||
374 | |||
365 | lock (m_rootAgents) | 375 | lock (m_rootAgents) |
366 | { | 376 | { |
367 | if (!m_rootAgents.Contains(remoteClient.AgentId)) | 377 | if (!m_rootAgents.Contains(remoteClient.AgentId)) |
@@ -370,7 +380,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
370 | uint xstart = 0; | 380 | uint xstart = 0; |
371 | uint ystart = 0; | 381 | uint ystart = 0; |
372 | Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); | 382 | Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); |
373 | if (itemtype == 6) // we only sevice 6 right now (avatar green dots) | 383 | if (itemtype == 6) // Service 6 right now (MAP_ITEM_AGENTS_LOCATION; green dots) |
374 | { | 384 | { |
375 | if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle) | 385 | if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle) |
376 | { | 386 | { |
@@ -414,14 +424,57 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
414 | // Remote Map Item Request | 424 | // Remote Map Item Request |
415 | 425 | ||
416 | // ensures that the blockingqueue doesn't get borked if the GetAgents() timing changes. | 426 | // ensures that the blockingqueue doesn't get borked if the GetAgents() timing changes. |
417 | // Note that we only start up a remote mapItem Request thread if there's users who could | 427 | RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle); |
418 | // be making requests | 428 | } |
419 | if (!threadrunning) | 429 | } else if (itemtype == 7) // Service 7 (MAP_ITEM_LAND_FOR_SALE) |
430 | { | ||
431 | if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle) | ||
432 | { | ||
433 | // Parcels | ||
434 | ILandChannel landChannel = m_scene.LandChannel; | ||
435 | List<ILandObject> parcels = landChannel.AllParcels(); | ||
436 | |||
437 | // Local Map Item Request | ||
438 | List<mapItemReply> mapitems = new List<mapItemReply>(); | ||
439 | mapItemReply mapitem = new mapItemReply(); | ||
440 | if ((parcels != null) && (parcels.Count >= 1)) | ||
420 | { | 441 | { |
421 | 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"); | 442 | foreach (ILandObject parcel_interface in parcels) |
422 | StartThread(new object()); | 443 | { |
444 | // Play it safe | ||
445 | if (!(parcel_interface is LandObject)) | ||
446 | continue; | ||
447 | |||
448 | LandObject land = (LandObject)parcel_interface; | ||
449 | LandData parcel = land.LandData; | ||
450 | |||
451 | // Show land for sale | ||
452 | if ((parcel.Flags & (uint)ParcelFlags.ForSale) == (uint)ParcelFlags.ForSale) | ||
453 | { | ||
454 | Vector3 min = parcel.AABBMin; | ||
455 | Vector3 max = parcel.AABBMax; | ||
456 | float x = (min.X+max.X)/2; | ||
457 | float y = (min.Y+max.Y)/2; | ||
458 | |||
459 | mapitem = new mapItemReply(); | ||
460 | mapitem.x = (uint)(xstart + x); | ||
461 | mapitem.y = (uint)(ystart + y); | ||
462 | // mapitem.z = (uint)m_scene.GetGroundHeight(x,y); | ||
463 | mapitem.id = UUID.Zero; | ||
464 | mapitem.name = parcel.Name; | ||
465 | mapitem.Extra = parcel.Area; | ||
466 | mapitem.Extra2 = parcel.SalePrice; | ||
467 | mapitems.Add(mapitem); | ||
468 | } | ||
469 | } | ||
423 | } | 470 | } |
471 | remoteClient.SendMapItemReply(mapitems.ToArray(), itemtype, flags); | ||
472 | } | ||
473 | else | ||
474 | { | ||
475 | // Remote Map Item Request | ||
424 | 476 | ||
477 | // ensures that the blockingqueue doesn't get borked if the GetAgents() timing changes. | ||
425 | RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle); | 478 | RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle); |
426 | } | 479 | } |
427 | } | 480 | } |
@@ -542,6 +595,28 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
542 | } | 595 | } |
543 | av.ControllingClient.SendMapItemReply(returnitems.ToArray(), mrs.itemtype, mrs.flags); | 596 | av.ControllingClient.SendMapItemReply(returnitems.ToArray(), mrs.itemtype, mrs.flags); |
544 | } | 597 | } |
598 | |||
599 | // Service 7 (MAP_ITEM_LAND_FOR_SALE) | ||
600 | uint itemtype = 7; | ||
601 | |||
602 | if (response.ContainsKey(itemtype.ToString())) | ||
603 | { | ||
604 | List<mapItemReply> returnitems = new List<mapItemReply>(); | ||
605 | OSDArray itemarray = (OSDArray)response[itemtype.ToString()]; | ||
606 | for (int i = 0; i < itemarray.Count; i++) | ||
607 | { | ||
608 | OSDMap mapitem = (OSDMap)itemarray[i]; | ||
609 | mapItemReply mi = new mapItemReply(); | ||
610 | mi.x = (uint)mapitem["X"].AsInteger(); | ||
611 | mi.y = (uint)mapitem["Y"].AsInteger(); | ||
612 | mi.id = mapitem["ID"].AsUUID(); | ||
613 | mi.Extra = mapitem["Extra"].AsInteger(); | ||
614 | mi.Extra2 = mapitem["Extra2"].AsInteger(); | ||
615 | mi.name = mapitem["Name"].AsString(); | ||
616 | returnitems.Add(mi); | ||
617 | } | ||
618 | av.ControllingClient.SendMapItemReply(returnitems.ToArray(), itemtype, mrs.flags); | ||
619 | } | ||
545 | } | 620 | } |
546 | } | 621 | } |
547 | } | 622 | } |
@@ -589,12 +664,23 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
589 | private OSDMap RequestMapItemsAsync(UUID id, uint flags, | 664 | private OSDMap RequestMapItemsAsync(UUID id, uint flags, |
590 | uint EstateID, bool godlike, uint itemtype, ulong regionhandle) | 665 | uint EstateID, bool godlike, uint itemtype, ulong regionhandle) |
591 | { | 666 | { |
667 | // m_log.DebugFormat("[WORLDMAP]: RequestMapItemsAsync; region handle: {0} {1}", regionhandle, itemtype); | ||
668 | |||
592 | string httpserver = ""; | 669 | string httpserver = ""; |
593 | bool blacklisted = false; | 670 | bool blacklisted = false; |
594 | lock (m_blacklistedregions) | 671 | lock (m_blacklistedregions) |
595 | { | 672 | { |
596 | if (m_blacklistedregions.ContainsKey(regionhandle)) | 673 | if (m_blacklistedregions.ContainsKey(regionhandle)) |
597 | blacklisted = true; | 674 | { |
675 | if (Environment.TickCount > (m_blacklistedregions[regionhandle] + blacklistTimeout)) | ||
676 | { | ||
677 | m_log.DebugFormat("[WORLDMAP]: Unblock blacklisted region {0}", regionhandle); | ||
678 | |||
679 | m_blacklistedregions.Remove(regionhandle); | ||
680 | } | ||
681 | else | ||
682 | blacklisted = true; | ||
683 | } | ||
598 | } | 684 | } |
599 | 685 | ||
600 | if (blacklisted) | 686 | if (blacklisted) |
@@ -636,7 +722,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
636 | lock (m_blacklistedurls) | 722 | lock (m_blacklistedurls) |
637 | { | 723 | { |
638 | if (m_blacklistedurls.ContainsKey(httpserver)) | 724 | if (m_blacklistedurls.ContainsKey(httpserver)) |
639 | blacklisted = true; | 725 | { |
726 | if (Environment.TickCount > (m_blacklistedurls[httpserver] + blacklistTimeout)) | ||
727 | { | ||
728 | m_log.DebugFormat("[WORLDMAP]: Unblock blacklisted URL {0}", httpserver); | ||
729 | |||
730 | m_blacklistedurls.Remove(httpserver); | ||
731 | } | ||
732 | else | ||
733 | blacklisted = true; | ||
734 | } | ||
640 | } | 735 | } |
641 | 736 | ||
642 | // Can't find the http server | 737 | // Can't find the http server |
@@ -682,7 +777,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
682 | mapitemsrequest.ContentLength = buffer.Length; //Count bytes to send | 777 | mapitemsrequest.ContentLength = buffer.Length; //Count bytes to send |
683 | os = mapitemsrequest.GetRequestStream(); | 778 | os = mapitemsrequest.GetRequestStream(); |
684 | os.Write(buffer, 0, buffer.Length); //Send it | 779 | os.Write(buffer, 0, buffer.Length); //Send it |
685 | os.Close(); | ||
686 | //m_log.DebugFormat("[WORLD MAP]: Getting MapItems from {0}", httpserver); | 780 | //m_log.DebugFormat("[WORLD MAP]: Getting MapItems from {0}", httpserver); |
687 | } | 781 | } |
688 | catch (WebException ex) | 782 | catch (WebException ex) |
@@ -705,6 +799,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
705 | responseMap["connect"] = OSD.FromBoolean(false); | 799 | responseMap["connect"] = OSD.FromBoolean(false); |
706 | return responseMap; | 800 | return responseMap; |
707 | } | 801 | } |
802 | finally | ||
803 | { | ||
804 | if (os != null) | ||
805 | os.Close(); | ||
806 | } | ||
708 | 807 | ||
709 | string response_mapItems_reply = null; | 808 | string response_mapItems_reply = null; |
710 | { // get the response | 809 | { // get the response |
@@ -1060,6 +1159,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1060 | 1159 | ||
1061 | Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); | 1160 | Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); |
1062 | 1161 | ||
1162 | // Service 6 (MAP_ITEM_AGENTS_LOCATION; green dots) | ||
1163 | |||
1063 | OSDMap responsemap = new OSDMap(); | 1164 | OSDMap responsemap = new OSDMap(); |
1064 | int tc = Environment.TickCount; | 1165 | int tc = Environment.TickCount; |
1065 | if (m_scene.GetRootAgentCount() == 0) | 1166 | if (m_scene.GetRootAgentCount() == 0) |
@@ -1092,6 +1193,60 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1092 | }); | 1193 | }); |
1093 | responsemap["6"] = responsearr; | 1194 | responsemap["6"] = responsearr; |
1094 | } | 1195 | } |
1196 | |||
1197 | // Service 7 (MAP_ITEM_LAND_FOR_SALE) | ||
1198 | |||
1199 | ILandChannel landChannel = m_scene.LandChannel; | ||
1200 | List<ILandObject> parcels = landChannel.AllParcels(); | ||
1201 | |||
1202 | if ((parcels == null) || (parcels.Count == 0)) | ||
1203 | { | ||
1204 | OSDMap responsemapdata = new OSDMap(); | ||
1205 | responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1)); | ||
1206 | responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1)); | ||
1207 | responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); | ||
1208 | responsemapdata["Name"] = OSD.FromString(""); | ||
1209 | responsemapdata["Extra"] = OSD.FromInteger(0); | ||
1210 | responsemapdata["Extra2"] = OSD.FromInteger(0); | ||
1211 | OSDArray responsearr = new OSDArray(); | ||
1212 | responsearr.Add(responsemapdata); | ||
1213 | |||
1214 | responsemap["7"] = responsearr; | ||
1215 | } | ||
1216 | else | ||
1217 | { | ||
1218 | OSDArray responsearr = new OSDArray(m_scene.GetRootAgentCount()); | ||
1219 | foreach (ILandObject parcel_interface in parcels) | ||
1220 | { | ||
1221 | // Play it safe | ||
1222 | if (!(parcel_interface is LandObject)) | ||
1223 | continue; | ||
1224 | |||
1225 | LandObject land = (LandObject)parcel_interface; | ||
1226 | LandData parcel = land.LandData; | ||
1227 | |||
1228 | // Show land for sale | ||
1229 | if ((parcel.Flags & (uint)ParcelFlags.ForSale) == (uint)ParcelFlags.ForSale) | ||
1230 | { | ||
1231 | Vector3 min = parcel.AABBMin; | ||
1232 | Vector3 max = parcel.AABBMax; | ||
1233 | float x = (min.X+max.X)/2; | ||
1234 | float y = (min.Y+max.Y)/2; | ||
1235 | |||
1236 | OSDMap responsemapdata = new OSDMap(); | ||
1237 | responsemapdata["X"] = OSD.FromInteger((int)(xstart + x)); | ||
1238 | responsemapdata["Y"] = OSD.FromInteger((int)(ystart + y)); | ||
1239 | // responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y)); | ||
1240 | responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); | ||
1241 | responsemapdata["Name"] = OSD.FromString(parcel.Name); | ||
1242 | responsemapdata["Extra"] = OSD.FromInteger(parcel.Area); | ||
1243 | responsemapdata["Extra2"] = OSD.FromInteger(parcel.SalePrice); | ||
1244 | responsearr.Add(responsemapdata); | ||
1245 | } | ||
1246 | } | ||
1247 | responsemap["7"] = responsearr; | ||
1248 | } | ||
1249 | |||
1095 | return responsemap; | 1250 | return responsemap; |
1096 | } | 1251 | } |
1097 | 1252 | ||
@@ -1110,14 +1265,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1110 | if (data == null) | 1265 | if (data == null) |
1111 | return; | 1266 | return; |
1112 | 1267 | ||
1113 | UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; | ||
1114 | |||
1115 | m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); | 1268 | m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); |
1116 | 1269 | ||
1117 | m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); | 1270 | UUID terrainImageID = UUID.Random(); |
1118 | 1271 | ||
1119 | AssetBase asset = new AssetBase( | 1272 | AssetBase asset = new AssetBase( |
1120 | m_scene.RegionInfo.RegionSettings.TerrainImageID, | 1273 | terrainImageID, |
1121 | "terrainImage_" + m_scene.RegionInfo.RegionID.ToString(), | 1274 | "terrainImage_" + m_scene.RegionInfo.RegionID.ToString(), |
1122 | (sbyte)AssetType.Texture, | 1275 | (sbyte)AssetType.Texture, |
1123 | m_scene.RegionInfo.RegionID.ToString()); | 1276 | m_scene.RegionInfo.RegionID.ToString()); |
@@ -1129,6 +1282,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1129 | // Store the new one | 1282 | // Store the new one |
1130 | m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID); | 1283 | m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID); |
1131 | m_scene.AssetService.Store(asset); | 1284 | m_scene.AssetService.Store(asset); |
1285 | |||
1286 | // Switch to the new one | ||
1287 | UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; | ||
1288 | m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID; | ||
1132 | m_scene.RegionInfo.RegionSettings.Save(); | 1289 | m_scene.RegionInfo.RegionSettings.Save(); |
1133 | 1290 | ||
1134 | // Delete the old one | 1291 | // Delete the old one |
@@ -1138,12 +1295,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1138 | 1295 | ||
1139 | private void MakeRootAgent(ScenePresence avatar) | 1296 | private void MakeRootAgent(ScenePresence avatar) |
1140 | { | 1297 | { |
1141 | // You may ask, why this is in a threadpool to start with.. | ||
1142 | // The reason is so we don't cause the thread to freeze waiting | ||
1143 | // for the 1 second it costs to start a thread manually. | ||
1144 | if (!threadrunning) | ||
1145 | Util.FireAndForget(this.StartThread); | ||
1146 | |||
1147 | lock (m_rootAgents) | 1298 | lock (m_rootAgents) |
1148 | { | 1299 | { |
1149 | if (!m_rootAgents.Contains(avatar.UUID)) | 1300 | if (!m_rootAgents.Contains(avatar.UUID)) |
@@ -1158,8 +1309,30 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1158 | lock (m_rootAgents) | 1309 | lock (m_rootAgents) |
1159 | { | 1310 | { |
1160 | m_rootAgents.Remove(avatar.UUID); | 1311 | m_rootAgents.Remove(avatar.UUID); |
1161 | if (m_rootAgents.Count == 0) | 1312 | } |
1162 | StopThread(); | 1313 | } |
1314 | |||
1315 | public void OnRegionUp(GridRegion otherRegion) | ||
1316 | { | ||
1317 | ulong regionhandle = otherRegion.RegionHandle; | ||
1318 | string httpserver = otherRegion.ServerURI + "MAP/MapItems/" + regionhandle.ToString(); | ||
1319 | |||
1320 | lock (m_blacklistedregions) | ||
1321 | { | ||
1322 | if (!m_blacklistedregions.ContainsKey(regionhandle)) | ||
1323 | m_blacklistedregions.Remove(regionhandle); | ||
1324 | } | ||
1325 | |||
1326 | lock (m_blacklistedurls) | ||
1327 | { | ||
1328 | if (m_blacklistedurls.ContainsKey(httpserver)) | ||
1329 | m_blacklistedurls.Remove(httpserver); | ||
1330 | } | ||
1331 | |||
1332 | lock (m_cachedRegionMapItemsAddress) | ||
1333 | { | ||
1334 | if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle)) | ||
1335 | m_cachedRegionMapItemsAddress.Remove(regionhandle); | ||
1163 | } | 1336 | } |
1164 | } | 1337 | } |
1165 | 1338 | ||