aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs11
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs26
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs15
-rw-r--r--OpenSim/Region/CoreModules/World/Region/RestartModule.cs4
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 82bef48..6461636 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -347,12 +347,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
347 347
348 landData.Add(parcel); 348 landData.Add(parcel);
349 } 349 }
350 350
351 if (!m_merge) 351 if (!m_merge)
352 m_scene.LandChannel.Clear(false); 352 {
353 bool setupDefaultParcel = (landData.Count == 0);
354 m_scene.LandChannel.Clear(setupDefaultParcel);
355 }
353 356
354 m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); 357 m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData);
355 m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count); 358 m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count);
356 } 359 }
357 360
358 /// <summary> 361 /// <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 bfab7b8..63dec15 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -520,8 +520,12 @@ namespace OpenSim.Region.CoreModules.World.Land
520 } 520 }
521 } 521 }
522 522
523 /// <summary>
524 /// Like handleEventManagerOnSignificantClientMovement, but called with an AgentUpdate regardless of distance.
525 /// </summary>
526 /// <param name="avatar"></param>
523 public void EventManagerOnClientMovement(ScenePresence avatar) 527 public void EventManagerOnClientMovement(ScenePresence avatar)
524 //Like handleEventManagerOnSignificantClientMovement, but called with an AgentUpdate regardless of distance. 528 //
525 { 529 {
526 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); 530 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
527 if (over != null) 531 if (over != null)
@@ -534,7 +538,6 @@ namespace OpenSim.Region.CoreModules.World.Land
534 } 538 }
535 } 539 }
536 540
537
538 public void ClientOnParcelAccessListRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID, 541 public void ClientOnParcelAccessListRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID,
539 int landLocalID, IClientAPI remote_client) 542 int landLocalID, IClientAPI remote_client)
540 { 543 {
@@ -668,14 +671,14 @@ namespace OpenSim.Region.CoreModules.World.Land
668 //m_scene.SimulationDataService.RemoveLandObject(lo.LandData.GlobalID); 671 //m_scene.SimulationDataService.RemoveLandObject(lo.LandData.GlobalID);
669 m_scene.EventManager.TriggerLandObjectRemoved(lo.LandData.GlobalID); 672 m_scene.EventManager.TriggerLandObjectRemoved(lo.LandData.GlobalID);
670 } 673 }
671 674
672 m_landList.Clear(); 675 m_landList.Clear();
676
677 ResetSimLandObjects();
678
679 if (setupDefaultParcel)
680 CreateDefaultParcel();
673 } 681 }
674
675 ResetSimLandObjects();
676
677 if (setupDefaultParcel)
678 CreateDefaultParcel();
679 } 682 }
680 683
681 private void performFinalLandJoin(ILandObject master, ILandObject slave) 684 private void performFinalLandJoin(ILandObject master, ILandObject slave)
@@ -1391,8 +1394,11 @@ namespace OpenSim.Region.CoreModules.World.Land
1391 1394
1392 public void EventManagerOnNoLandDataFromStorage() 1395 public void EventManagerOnNoLandDataFromStorage()
1393 { 1396 {
1394 ResetSimLandObjects(); 1397 lock (m_landList)
1395 CreateDefaultParcel(); 1398 {
1399 ResetSimLandObjects();
1400 CreateDefaultParcel();
1401 }
1396 } 1402 }
1397 1403
1398 #endregion 1404 #endregion
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index c2f104e..560b862 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 e983239..0f37ddd 100644
--- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs
+++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs
@@ -70,14 +70,14 @@ namespace OpenSim.Region.CoreModules.World.Region
70 false, "region restart bluebox", 70 false, "region restart bluebox",
71 "region restart bluebox <message> <delta seconds>+", 71 "region restart bluebox <message> <delta seconds>+",
72 "Schedule a region restart", 72 "Schedule a region restart",
73 "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.", 73 "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.",
74 HandleRegionRestart); 74 HandleRegionRestart);
75 75
76 MainConsole.Instance.Commands.AddCommand("RestartModule", 76 MainConsole.Instance.Commands.AddCommand("RestartModule",
77 false, "region restart notice", 77 false, "region restart notice",
78 "region restart notice <message> <delta seconds>+", 78 "region restart notice <message> <delta seconds>+",
79 "Schedule a region restart", 79 "Schedule a region restart",
80 "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.", 80 "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.",
81 HandleRegionRestart); 81 HandleRegionRestart);
82 82
83 MainConsole.Instance.Commands.AddCommand("RestartModule", 83 MainConsole.Instance.Commands.AddCommand("RestartModule",