diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
5 files changed, 35 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 930a117..d11d677 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -365,12 +365,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
365 | 365 | ||
366 | landData.Add(parcel); | 366 | landData.Add(parcel); |
367 | } | 367 | } |
368 | 368 | ||
369 | if (!m_merge) | 369 | if (!m_merge) |
370 | m_scene.LandChannel.Clear(false); | 370 | { |
371 | bool setupDefaultParcel = (landData.Count == 0); | ||
372 | m_scene.LandChannel.Clear(setupDefaultParcel); | ||
373 | } | ||
371 | 374 | ||
372 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); | 375 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); |
373 | m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count); | 376 | m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count); |
374 | } | 377 | } |
375 | 378 | ||
376 | /// <summary> | 379 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 2307c8e..729e9f7 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -313,6 +313,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
313 | Assert.That(loadedSoundAsset, Is.Not.Null, "loaded sound asset was null"); | 313 | Assert.That(loadedSoundAsset, Is.Not.Null, "loaded sound asset was null"); |
314 | Assert.That(loadedSoundAsset.Data, Is.EqualTo(soundData), "saved and loaded sound data do not match"); | 314 | Assert.That(loadedSoundAsset.Data, Is.EqualTo(soundData), "saved and loaded sound data do not match"); |
315 | 315 | ||
316 | Assert.Greater(m_scene.LandChannel.AllParcels().Count, 0, "incorrect number of parcels"); | ||
317 | |||
316 | // Temporary | 318 | // Temporary |
317 | Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); | 319 | Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); |
318 | } | 320 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index f28faed..4e7c76f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -437,8 +437,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
437 | } | 437 | } |
438 | } | 438 | } |
439 | 439 | ||
440 | /// <summary> | ||
441 | /// Like handleEventManagerOnSignificantClientMovement, but called with an AgentUpdate regardless of distance. | ||
442 | /// </summary> | ||
443 | /// <param name="avatar"></param> | ||
440 | public void EventManagerOnClientMovement(ScenePresence avatar) | 444 | public void EventManagerOnClientMovement(ScenePresence avatar) |
441 | //Like handleEventManagerOnSignificantClientMovement, but called with an AgentUpdate regardless of distance. | 445 | // |
442 | { | 446 | { |
443 | ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 447 | ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
444 | if (over != null) | 448 | if (over != null) |
@@ -451,7 +455,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
451 | } | 455 | } |
452 | } | 456 | } |
453 | 457 | ||
454 | |||
455 | public void ClientOnParcelAccessListRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID, | 458 | public void ClientOnParcelAccessListRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID, |
456 | int landLocalID, IClientAPI remote_client) | 459 | int landLocalID, IClientAPI remote_client) |
457 | { | 460 | { |
@@ -585,14 +588,14 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
585 | //m_scene.SimulationDataService.RemoveLandObject(lo.LandData.GlobalID); | 588 | //m_scene.SimulationDataService.RemoveLandObject(lo.LandData.GlobalID); |
586 | m_scene.EventManager.TriggerLandObjectRemoved(lo.LandData.GlobalID); | 589 | m_scene.EventManager.TriggerLandObjectRemoved(lo.LandData.GlobalID); |
587 | } | 590 | } |
588 | 591 | ||
589 | m_landList.Clear(); | 592 | m_landList.Clear(); |
593 | |||
594 | ResetSimLandObjects(); | ||
595 | |||
596 | if (setupDefaultParcel) | ||
597 | CreateDefaultParcel(); | ||
590 | } | 598 | } |
591 | |||
592 | ResetSimLandObjects(); | ||
593 | |||
594 | if (setupDefaultParcel) | ||
595 | CreateDefaultParcel(); | ||
596 | } | 599 | } |
597 | 600 | ||
598 | private void performFinalLandJoin(ILandObject master, ILandObject slave) | 601 | private void performFinalLandJoin(ILandObject master, ILandObject slave) |
@@ -1324,8 +1327,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1324 | 1327 | ||
1325 | public void EventManagerOnNoLandDataFromStorage() | 1328 | public void EventManagerOnNoLandDataFromStorage() |
1326 | { | 1329 | { |
1327 | ResetSimLandObjects(); | 1330 | lock (m_landList) |
1328 | CreateDefaultParcel(); | 1331 | { |
1332 | ResetSimLandObjects(); | ||
1333 | CreateDefaultParcel(); | ||
1334 | } | ||
1329 | } | 1335 | } |
1330 | 1336 | ||
1331 | #endregion | 1337 | #endregion |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 0fbc93c..6c9bb10 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
67 | public int GetPrimsFree() | 67 | public int GetPrimsFree() |
68 | { | 68 | { |
69 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); | 69 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); |
70 | int free = GetSimulatorMaxPrimCount(this) - m_landData.SimwidePrims; | 70 | int free = GetSimulatorMaxPrimCount() - m_landData.SimwidePrims; |
71 | return free; | 71 | return free; |
72 | } | 72 | } |
73 | 73 | ||
@@ -181,11 +181,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
181 | overrideSimulatorMaxPrimCount = overrideDel; | 181 | overrideSimulatorMaxPrimCount = overrideDel; |
182 | } | 182 | } |
183 | 183 | ||
184 | public int GetParcelMaxPrimCount(ILandObject thisObject) | 184 | public int GetParcelMaxPrimCount() |
185 | { | 185 | { |
186 | if (overrideParcelMaxPrimCount != null) | 186 | if (overrideParcelMaxPrimCount != null) |
187 | { | 187 | { |
188 | return overrideParcelMaxPrimCount(thisObject); | 188 | return overrideParcelMaxPrimCount(this); |
189 | } | 189 | } |
190 | else | 190 | else |
191 | { | 191 | { |
@@ -197,11 +197,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
197 | return parcelMax; | 197 | return parcelMax; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | public int GetSimulatorMaxPrimCount(ILandObject thisObject) | 200 | |
201 | public int GetSimulatorMaxPrimCount() | ||
201 | { | 202 | { |
202 | if (overrideSimulatorMaxPrimCount != null) | 203 | if (overrideSimulatorMaxPrimCount != null) |
203 | { | 204 | { |
204 | return overrideSimulatorMaxPrimCount(thisObject); | 205 | return overrideSimulatorMaxPrimCount(this); |
205 | } | 206 | } |
206 | else | 207 | else |
207 | { | 208 | { |
@@ -244,8 +245,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
244 | remote_client.SendLandProperties(seq_id, | 245 | remote_client.SendLandProperties(seq_id, |
245 | snap_selection, request_result, this, | 246 | snap_selection, request_result, this, |
246 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, | 247 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, |
247 | GetParcelMaxPrimCount(this), | 248 | GetParcelMaxPrimCount(), |
248 | GetSimulatorMaxPrimCount(this), regionFlags); | 249 | GetSimulatorMaxPrimCount(), regionFlags); |
249 | } | 250 | } |
250 | 251 | ||
251 | public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client) | 252 | public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client) |
diff --git a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs index c2934cd..7f6f4df 100644 --- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs +++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs | |||
@@ -82,14 +82,14 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
82 | false, "region restart bluebox", | 82 | false, "region restart bluebox", |
83 | "region restart bluebox <message> <delta seconds>+", | 83 | "region restart bluebox <message> <delta seconds>+", |
84 | "Schedule a region restart", | 84 | "Schedule a region restart", |
85 | "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a transient notice. If multiple deltas are given then a notice is sent when we reach each delta.", | 85 | "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a dismissable bluebox notice. If multiple deltas are given then a notice is sent when we reach each delta.", |
86 | HandleRegionRestart); | 86 | HandleRegionRestart); |
87 | 87 | ||
88 | MainConsole.Instance.Commands.AddCommand("RestartModule", | 88 | MainConsole.Instance.Commands.AddCommand("RestartModule", |
89 | false, "region restart notice", | 89 | false, "region restart notice", |
90 | "region restart notice <message> <delta seconds>+", | 90 | "region restart notice <message> <delta seconds>+", |
91 | "Schedule a region restart", | 91 | "Schedule a region restart", |
92 | "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a dismissable bluebox notice. If multiple deltas are given then a notice is sent when we reach each delta.", | 92 | "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a transient notice. If multiple deltas are given then a notice is sent when we reach each delta.", |
93 | HandleRegionRestart); | 93 | HandleRegionRestart); |
94 | 94 | ||
95 | MainConsole.Instance.Commands.AddCommand("RestartModule", | 95 | MainConsole.Instance.Commands.AddCommand("RestartModule", |