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/SceneObject.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObject.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs index 7992b17..95db271 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs @@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Scenes this.CreateRootFromShape(ownerID, localID, shape, pos); registerEvents(); - + } /// @@ -97,7 +97,7 @@ namespace OpenSim.Region.Environment.Scenes /// Need a null constructor for duplication public SceneObject() { - + } public void registerEvents() @@ -121,18 +121,15 @@ namespace OpenSim.Region.Environment.Scenes datastore.StoreObject(this); } - /// /// Sends my primitive info to the parcel manager for it to keep tally of all of the prims! /// private void ProcessParcelPrimCountUpdate() { + m_eventManager.TriggerParcelPrimCountAdd(this); } - - - /// /// /// @@ -141,7 +138,9 @@ namespace OpenSim.Region.Environment.Scenes /// public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos) { - this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_world,this.m_eventManager, agentID, localID, true, this, this, shape, pos); + + this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_world, agentID, localID, true, this, this, shape, pos); + this.children.Add(rootPrimitive); this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive); } @@ -156,7 +155,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// Copies a prim or group of prims (SceneObject) -- TODO: cleanup code + /// Makes a copy of this SceneObject (and child primitives) /// /// A complete copy of the object public new SceneObject Copy() @@ -171,8 +170,8 @@ namespace OpenSim.Region.Environment.Scenes dupe.children.Add(dupe.rootPrimitive); dupe.rootPrimitive.Pos = this.Pos; dupe.Rotation = this.Rotation; - LLUUID rootu= dupe.rootUUID; - uint rooti = dupe.rootLocalID; + LLUUID rootu = dupe.rootUUID; + uint rooti = dupe.rootLocalID; dupe.registerEvents(); return dupe; -- cgit v1.1