diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 01e6752..81bab9a 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
59 | private uint _primCount = 702000; | 59 | private uint _primCount = 702000; |
60 | private System.Threading.Mutex _primAllocateMutex = new Mutex(false); | 60 | private System.Threading.Mutex _primAllocateMutex = new Mutex(false); |
61 | private int storageCount; | 61 | private int storageCount; |
62 | private int parcelPrimCheckCount; | ||
62 | private Mutex updateLock; | 63 | private Mutex updateLock; |
63 | 64 | ||
64 | protected AuthenticateSessionsBase authenticateHandler; | 65 | protected AuthenticateSessionsBase authenticateHandler; |
@@ -144,6 +145,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | Terrain = new TerrainEngine(); | 145 | Terrain = new TerrainEngine(); |
145 | 146 | ||
146 | ScenePresence.LoadAnims(); | 147 | ScenePresence.LoadAnims(); |
148 | |||
149 | this.performParcelPrimCountUpdate(); | ||
147 | this.httpListener = httpServer; | 150 | this.httpListener = httpServer; |
148 | } | 151 | } |
149 | #endregion | 152 | #endregion |
@@ -211,6 +214,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
211 | this.Backup(); | 214 | this.Backup(); |
212 | storageCount = 0; | 215 | storageCount = 0; |
213 | } | 216 | } |
217 | |||
218 | this.parcelPrimCheckCount++; | ||
219 | if (this.parcelPrimCheckCount > 50) //check every 5 seconds for tainted prims | ||
220 | { | ||
221 | if (m_parcelManager.parcelPrimCountTainted) | ||
222 | { | ||
223 | //Perform parcel update of prim count | ||
224 | performParcelPrimCountUpdate(); | ||
225 | this.parcelPrimCheckCount = 0; | ||
226 | } | ||
227 | } | ||
228 | |||
214 | } | 229 | } |
215 | catch (Exception e) | 230 | catch (Exception e) |
216 | { | 231 | { |
@@ -441,7 +456,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
441 | { | 456 | { |
442 | try | 457 | try |
443 | { | 458 | { |
444 | SceneObject sceneOb = new SceneObject(m_regionHandle, this, ownerID, this.PrimIDAllocate(), pos, shape); | 459 | SceneObject sceneOb = new SceneObject(m_regionHandle, this, this.m_eventManager,this.m_parcelManager, ownerID, this.PrimIDAllocate(), pos, shape); |
445 | this.Entities.Add(sceneOb.rootUUID, sceneOb); | 460 | this.Entities.Add(sceneOb.rootUUID, sceneOb); |
446 | 461 | ||
447 | // Trigger event for listeners | 462 | // Trigger event for listeners |
@@ -809,6 +824,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
809 | return this.commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position); | 824 | return this.commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position); |
810 | } | 825 | } |
811 | 826 | ||
827 | public void performParcelPrimCountUpdate() | ||
828 | { | ||
829 | m_parcelManager.resetAllParcelPrimCounts(); | ||
830 | m_eventManager.TriggerParcelPrimCountUpdate(); | ||
831 | m_parcelManager.parcelPrimCountTainted = false; | ||
832 | } | ||
812 | #endregion | 833 | #endregion |
813 | 834 | ||
814 | } | 835 | } |