From d04443b4fe0fb3993b53086d95be97a766b409f6 Mon Sep 17 00:00:00 2001
From: mingchen
Date: Fri, 23 May 2008 15:12:15 +0000
Subject: *Refactor of the LandManagementModule that allows OpenSim to run
without it
---
OpenSim/Region/Environment/Scenes/Scene.cs | 35 +++++++-----------------------
1 file changed, 8 insertions(+), 27 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 774ddfc..fe8cada 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -819,7 +819,7 @@ namespace OpenSim.Region.Environment.Scenes
{
if (LandChannel.IsLandPrimCountTainted())
{
- LandChannel.PerformParcelPrimCountUpdate();
+ EventManager.TriggerParcelPrimCountUpdate();
}
}
}
@@ -970,12 +970,12 @@ namespace OpenSim.Region.Environment.Scenes
if (dGridSettings["allow_forceful_banlines"] != "TRUE")
{
m_log.Info("[GRID]: Grid is disabling forceful parcel banlists");
- LandChannel.AllowedForcefulBans = false;
+ EventManager.TriggerSetAllowForcefulBan(false);
}
else
{
m_log.Info("[GRID]: Grid is allowing forceful parcel banlists");
- LandChannel.AllowedForcefulBans = true;
+ EventManager.TriggerSetAllowForcefulBan(true);
}
}
}
@@ -1142,11 +1142,11 @@ namespace OpenSim.Region.Environment.Scenes
{
if (landData.Count == 0)
{
- LandChannel.NoLandDataFromStorage();
+ EventManager.TriggerNoticeNoLandDataFromStorage();
}
else
{
- LandChannel.IncomingLandObjectsFromStorage(landData);
+ EventManager.TriggerIncomingLandDataFromStorage(landData);
}
}
else
@@ -1344,22 +1344,13 @@ namespace OpenSim.Region.Environment.Scenes
{
if (Entities.ContainsKey(sceneObject.UUID))
{
- LandChannel.RemovePrimFromLandPrimCounts(sceneObject);
+ EventManager.TriggerObjectBeingRemovedFromScene(sceneObject);
Entities.Remove(sceneObject.UUID);
- LandChannel.SetPrimsTainted();
+ EventManager.TriggerParcelPrimCountTainted();
m_innerScene.RemoveAPrimCount();
}
}
- ///
- /// Called by a prim when it has been created/cloned, so that its events can be subscribed to
- ///
- ///
- public void AcknowledgeNewPrim(SceneObjectGroup prim)
- {
- prim.OnPrimCountTainted += LandChannel.SetPrimsTainted;
- }
-
public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset)
{
m_sceneXmlLoader.LoadPrimsFromXml(fileName, newIdsFlag, loadOffset);
@@ -1589,15 +1580,6 @@ namespace OpenSim.Region.Environment.Scenes
CreateAndAddScenePresence(client, child);
- try
- {
- LandChannel.SendParcelOverlay(client);
- } //BUG: Mike - please fix this.
- catch (KeyNotFoundException)
- {
- m_log.Warn("[LAND]: Bug #2 triggered with NPC. LandModule needs a refactor to fix this.");
- }
-
CommsManager.UserProfileCacheService.AddNewUser(client.AgentId);
}
}
@@ -3174,8 +3156,7 @@ namespace OpenSim.Region.Environment.Scenes
lock (Entities)
{
- Entities.Remove(group.UUID);
- m_innerScene.RemoveAPrimCount();
+ RemoveEntity(group);
}
group.DeleteParts();
--
cgit v1.1