aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.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/Scene.cs
parentDoc correction (diff)
downloadopensim-SC-932a1321167814ab13a21121a9b9a8bf2eca1641.zip
opensim-SC-932a1321167814ab13a21121a9b9a8bf2eca1641.tar.gz
opensim-SC-932a1321167814ab13a21121a9b9a8bf2eca1641.tar.bz2
opensim-SC-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/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 7af3f5b..36e98cf 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -120,7 +120,9 @@ namespace OpenSim.Region.Environment.Scenes
120 120
121 private int m_update_physics = 1; 121 private int m_update_physics = 1;
122 private int m_update_entitymovement = 1; 122 private int m_update_entitymovement = 1;
123 private int m_update_entities = 1; 123 private int m_update_entities = 20; // Run through all objects checking for updates
124 private int m_update_entitiesquick = 1; // Run through objects that have scheduled updates checking for updates
125 private int m_update_presences = 1; // Update scene presence movements
124 private int m_update_events = 1; 126 private int m_update_events = 1;
125 private int m_update_backup = 200; 127 private int m_update_backup = 200;
126 private int m_update_terrain = 50; 128 private int m_update_terrain = 50;
@@ -706,9 +708,19 @@ namespace OpenSim.Region.Environment.Scenes
706 physicsMS += physicsMS2; 708 physicsMS += physicsMS2;
707 709
708 otherMS = System.Environment.TickCount; 710 otherMS = System.Environment.TickCount;
711 // run through all entities looking for updates (slow)
709 if (m_frame % m_update_entities == 0) 712 if (m_frame % m_update_entities == 0)
710 m_innerScene.UpdateEntities(); 713 m_innerScene.UpdateEntities();
711 714
715 // run through entities that have scheduled themselves for
716 // updates looking for updates(faster)
717 if (m_frame % m_update_entitiesquick == 0)
718 m_innerScene.ProcessUpdates();
719
720 // Run through scenepresences looking for updates
721 if (m_frame % m_update_presences == 0)
722 m_innerScene.UpdatePresences();
723
712 if (m_frame % m_update_events == 0) 724 if (m_frame % m_update_events == 0)
713 UpdateEvents(); 725 UpdateEvents();
714 726
@@ -1167,6 +1179,7 @@ namespace OpenSim.Region.Environment.Scenes
1167 } 1179 }
1168 // if not phantom, add to physics 1180 // if not phantom, add to physics
1169 sceneOb.ApplyPhysics(m_physicalPrim); 1181 sceneOb.ApplyPhysics(m_physicalPrim);
1182 m_innerScene.AddToUpdateList(sceneOb);
1170 1183
1171 return sceneOb; 1184 return sceneOb;
1172 } 1185 }