aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-20 00:08:04 +0000
committerTeravus Ovares2008-02-20 00:08:04 +0000
commit932a1321167814ab13a21121a9b9a8bf2eca1641 (patch)
tree94de5092a91d5461eab216942ea205b0a6620eb2 /OpenSim/Region/Environment/Scenes/InnerScene.cs
parentDoc correction (diff)
downloadopensim-SC_OLD-932a1321167814ab13a21121a9b9a8bf2eca1641.zip
opensim-SC_OLD-932a1321167814ab13a21121a9b9a8bf2eca1641.tar.gz
opensim-SC_OLD-932a1321167814ab13a21121a9b9a8bf2eca1641.tar.bz2
opensim-SC_OLD-932a1321167814ab13a21121a9b9a8bf2eca1641.tar.xz
* Made a quickupdate method to run through only entities that have scheduled themselves for updates looking for changes. This runs 10 times a second.
* Set the massively slow UpdateEntities method to run every 2 seconds instead of 10 times a second. This method runs through *all* of the entities can calls the virtual update(). * Documented some of the code in the scene.Update method.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 57b8ae7..38bcb03 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -62,6 +62,7 @@ namespace OpenSim.Region.Environment.Scenes
62 protected RegionInfo m_regInfo; 62 protected RegionInfo m_regInfo;
63 protected Scene m_parentScene; 63 protected Scene m_parentScene;
64 protected PermissionManager PermissionsMngr; 64 protected PermissionManager PermissionsMngr;
65 protected List<EntityBase> m_updateList = new List<EntityBase>();
65 protected int m_numRootAgents = 0; 66 protected int m_numRootAgents = 0;
66 protected int m_numPrim = 0; 67 protected int m_numPrim = 0;
67 protected int m_numChildAgents = 0; 68 protected int m_numChildAgents = 0;
@@ -146,6 +147,15 @@ namespace OpenSim.Region.Environment.Scenes
146 } 147 }
147 } 148 }
148 149
150 internal void UpdatePresences()
151 {
152 List<ScenePresence> updateScenePresences = GetScenePresences();
153 foreach (ScenePresence pres in updateScenePresences)
154 {
155 pres.Update();
156 }
157 }
158
149 internal float UpdatePhysics(double elapsed) 159 internal float UpdatePhysics(double elapsed)
150 { 160 {
151 lock (m_syncRoot) 161 lock (m_syncRoot)
@@ -194,6 +204,29 @@ namespace OpenSim.Region.Environment.Scenes
194 } 204 }
195 } 205 }
196 206
207 internal void AddToUpdateList(EntityBase obj)
208 {
209 lock (m_updateList)
210 {
211 if (!m_updateList.Contains(obj))
212 {
213 m_updateList.Add(obj);
214 }
215 }
216 }
217
218 internal void ProcessUpdates()
219 {
220 lock (m_updateList)
221 {
222 for (int i = 0; i < m_updateList.Count; i++)
223 {
224 m_updateList[i].Update();
225 }
226 m_updateList.Clear();
227 }
228 }
229
197 public void AddPhysicalPrim(int number) 230 public void AddPhysicalPrim(int number)
198 { 231 {
199 m_physicalPrim++; 232 m_physicalPrim++;