aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2007-07-15 17:40:21 +0000
committerMW2007-07-15 17:40:21 +0000
commita87ebda8950d4ab3bb8ceb2afe2801d530703d8f (patch)
tree877a42b4ca882b80e408dec2796ee4e6a2d50920 /OpenSim/Region/Environment/Scenes/Scene.cs
parent* PROTIP: It helps to know what your doing when playing with reflection. (diff)
downloadopensim-SC_OLD-a87ebda8950d4ab3bb8ceb2afe2801d530703d8f.zip
opensim-SC_OLD-a87ebda8950d4ab3bb8ceb2afe2801d530703d8f.tar.gz
opensim-SC_OLD-a87ebda8950d4ab3bb8ceb2afe2801d530703d8f.tar.bz2
opensim-SC_OLD-a87ebda8950d4ab3bb8ceb2afe2801d530703d8f.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs17
1 files changed, 12 insertions, 5 deletions
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
139 m_scriptManager = new ScriptManager(this); 139 m_scriptManager = new ScriptManager(this);
140 m_eventManager = new EventManager(); 140 m_eventManager = new EventManager();
141 141
142 m_eventManager.OnParcelPrimCountTainted += new EventManager.OnParcelPrimCountTaintedDelegate(m_parcelManager.setPrimsTainted);
143 m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_parcelManager.addPrimToParcelCounts); 142 m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_parcelManager.addPrimToParcelCounts);
144 143
145 MainLog.Instance.Verbose("World.cs - creating new entitities instance"); 144 MainLog.Instance.Verbose("World.cs - creating new entitities instance");
@@ -221,14 +220,14 @@ namespace OpenSim.Region.Environment.Scenes
221 } 220 }
222 221
223 this.parcelPrimCheckCount++; 222 this.parcelPrimCheckCount++;
224 if (this.parcelPrimCheckCount > 50) //check every 5 seconds for tainted prims 223 if (this.parcelPrimCheckCount > 100) //check every 10 seconds for tainted prims
225 { 224 {
226 if (m_parcelManager.parcelPrimCountTainted) 225 if (m_parcelManager.parcelPrimCountTainted)
227 { 226 {
228 //Perform parcel update of prim count 227 //Perform parcel update of prim count
229 performParcelPrimCountUpdate(); 228 performParcelPrimCountUpdate();
230 this.parcelPrimCheckCount = 0; 229 this.parcelPrimCheckCount = 0;
231 } 230 }
232 } 231 }
233 232
234 } 233 }
@@ -434,7 +433,6 @@ namespace OpenSim.Region.Environment.Scenes
434 /// <param name="prim">The object to load</param> 433 /// <param name="prim">The object to load</param>
435 public void PrimFromStorage(PrimData prim) 434 public void PrimFromStorage(PrimData prim)
436 { 435 {
437
438 } 436 }
439 437
440 /// <summary> 438 /// <summary>
@@ -460,7 +458,8 @@ namespace OpenSim.Region.Environment.Scenes
460 /// <param name="ownerID"></param> 458 /// <param name="ownerID"></param>
461 public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape) 459 public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape)
462 { 460 {
463 SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, this.PrimIDAllocate(), pos, shape); 461
462 SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, this.PrimIDAllocate(), pos, shape);
464 AddNewEntity(sceneOb); 463 AddNewEntity(sceneOb);
465 } 464 }
466 465
@@ -469,6 +468,14 @@ namespace OpenSim.Region.Environment.Scenes
469 this.Entities.Add(sceneObject.rootUUID, sceneObject); 468 this.Entities.Add(sceneObject.rootUUID, sceneObject);
470 } 469 }
471 470
471 /// <summary>
472 /// Called by a prim when it has been created/cloned, so that its events can be subscribed to
473 /// </summary>
474 /// <param name="prim"></param>
475 public void AcknowledgeNewPrim(Primitive prim)
476 {
477 prim.OnPrimCountTainted += m_parcelManager.setPrimsTainted;
478 }
472 #endregion 479 #endregion
473 480
474 #region Add/Remove Avatar Methods 481 #region Add/Remove Avatar Methods