aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2009-07-17 07:28:09 +0000
committerTeravus Ovares2009-07-17 07:28:09 +0000
commitf74622c65fe8934d5f3b69975e8dba24d02985fe (patch)
treeff0bd8a26de159686987b7d57820b614429e5afa /OpenSim/Region/Framework/Scenes/Scene.cs
parentRevert the nonessential part of r10033 to restore sanity to trampolines (diff)
downloadopensim-SC_OLD-f74622c65fe8934d5f3b69975e8dba24d02985fe.zip
opensim-SC_OLD-f74622c65fe8934d5f3b69975e8dba24d02985fe.tar.gz
opensim-SC_OLD-f74622c65fe8934d5f3b69975e8dba24d02985fe.tar.bz2
opensim-SC_OLD-f74622c65fe8934d5f3b69975e8dba24d02985fe.tar.xz
* Change the order of Update so Physics processes a frame before the scene manipulates the physics Scene.cs
* Remove the draconic locking around adding an avatar to the Scene * Handle an extreme error case when border crossing fails and user uses map to teleport to a different region on the same instance causing control commands to go to a child agent. * Make the Set Appearance method use the proper 'remove from physics scene' method. * It *may* help border crossings. * It *may* help the 'on avatar rez' lag, that people have been seeing the past week. * It may also cause physics to crash more often on failed teleports (though.. I think I got the cases covered).
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs38
1 files changed, 20 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 660ee8d..81d54e7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -901,24 +901,7 @@ namespace OpenSim.Region.Framework.Scenes
901 if (m_frame == Int32.MaxValue) 901 if (m_frame == Int32.MaxValue)
902 m_frame = 0; 902 m_frame = 0;
903 903
904 physicsMS2 = Environment.TickCount; 904
905 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
906 m_sceneGraph.UpdatePreparePhysics();
907 physicsMS2 = Environment.TickCount - physicsMS2;
908
909 if (m_frame % m_update_entitymovement == 0)
910 m_sceneGraph.UpdateEntityMovement();
911
912 physicsMS = Environment.TickCount;
913 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
914 physicsFPS = m_sceneGraph.UpdatePhysics(
915 Math.Max(SinceLastFrame.TotalSeconds, m_timespan)
916 );
917 if (m_frame % m_update_physics == 0 && SynchronizeScene != null)
918 SynchronizeScene(this);
919
920 physicsMS = Environment.TickCount - physicsMS;
921 physicsMS += physicsMS2;
922 905
923 otherMS = Environment.TickCount; 906 otherMS = Environment.TickCount;
924 // run through all entities looking for updates (slow) 907 // run through all entities looking for updates (slow)
@@ -949,6 +932,25 @@ namespace OpenSim.Region.Framework.Scenes
949 if (m_frame % m_update_presences == 0) 932 if (m_frame % m_update_presences == 0)
950 m_sceneGraph.UpdatePresences(); 933 m_sceneGraph.UpdatePresences();
951 934
935 physicsMS2 = Environment.TickCount;
936 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
937 m_sceneGraph.UpdatePreparePhysics();
938 physicsMS2 = Environment.TickCount - physicsMS2;
939
940 if (m_frame % m_update_entitymovement == 0)
941 m_sceneGraph.UpdateEntityMovement();
942
943 physicsMS = Environment.TickCount;
944 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
945 physicsFPS = m_sceneGraph.UpdatePhysics(
946 Math.Max(SinceLastFrame.TotalSeconds, m_timespan)
947 );
948 if (m_frame % m_update_physics == 0 && SynchronizeScene != null)
949 SynchronizeScene(this);
950
951 physicsMS = Environment.TickCount - physicsMS;
952 physicsMS += physicsMS2;
953
952 // Delete temp-on-rez stuff 954 // Delete temp-on-rez stuff
953 if (m_frame % m_update_backup == 0) 955 if (m_frame % m_update_backup == 0)
954 CleanTempObjects(); 956 CleanTempObjects();