From a87ebda8950d4ab3bb8ceb2afe2801d530703d8f Mon Sep 17 00:00:00 2001
From: MW
Date: Sun, 15 Jul 2007 17:40:21 +0000
Subject: Removed reference to Scene EventManager from primitive. In its place,
primitive now has its own event (OnPrimCountTainted) that ParcelManager
subscribes to. Removed some unused code from SimpleApp.
---
OpenSim/Region/Environment/Scenes/Scene.cs | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 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 e370047..ad46322 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -139,7 +139,6 @@ namespace OpenSim.Region.Environment.Scenes
m_scriptManager = new ScriptManager(this);
m_eventManager = new EventManager();
- m_eventManager.OnParcelPrimCountTainted += new EventManager.OnParcelPrimCountTaintedDelegate(m_parcelManager.setPrimsTainted);
m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_parcelManager.addPrimToParcelCounts);
MainLog.Instance.Verbose("World.cs - creating new entitities instance");
@@ -221,14 +220,14 @@ namespace OpenSim.Region.Environment.Scenes
}
this.parcelPrimCheckCount++;
- if (this.parcelPrimCheckCount > 50) //check every 5 seconds for tainted prims
+ if (this.parcelPrimCheckCount > 100) //check every 10 seconds for tainted prims
{
if (m_parcelManager.parcelPrimCountTainted)
{
//Perform parcel update of prim count
performParcelPrimCountUpdate();
this.parcelPrimCheckCount = 0;
- }
+ }
}
}
@@ -434,7 +433,6 @@ namespace OpenSim.Region.Environment.Scenes
/// The object to load
public void PrimFromStorage(PrimData prim)
{
-
}
///
@@ -460,7 +458,8 @@ namespace OpenSim.Region.Environment.Scenes
///
public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape)
{
- SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, this.PrimIDAllocate(), pos, shape);
+
+ SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, this.PrimIDAllocate(), pos, shape);
AddNewEntity(sceneOb);
}
@@ -469,6 +468,14 @@ namespace OpenSim.Region.Environment.Scenes
this.Entities.Add(sceneObject.rootUUID, sceneObject);
}
+ ///
+ /// Called by a prim when it has been created/cloned, so that its events can be subscribed to
+ ///
+ ///
+ public void AcknowledgeNewPrim(Primitive prim)
+ {
+ prim.OnPrimCountTainted += m_parcelManager.setPrimsTainted;
+ }
#endregion
#region Add/Remove Avatar Methods
--
cgit v1.1