mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
* 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).
This commit is contained in:
@@ -901,24 +901,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (m_frame == Int32.MaxValue)
|
||||
m_frame = 0;
|
||||
|
||||
physicsMS2 = Environment.TickCount;
|
||||
if ((m_frame % m_update_physics == 0) && m_physics_enabled)
|
||||
m_sceneGraph.UpdatePreparePhysics();
|
||||
physicsMS2 = Environment.TickCount - physicsMS2;
|
||||
|
||||
if (m_frame % m_update_entitymovement == 0)
|
||||
m_sceneGraph.UpdateEntityMovement();
|
||||
|
||||
physicsMS = Environment.TickCount;
|
||||
if ((m_frame % m_update_physics == 0) && m_physics_enabled)
|
||||
physicsFPS = m_sceneGraph.UpdatePhysics(
|
||||
Math.Max(SinceLastFrame.TotalSeconds, m_timespan)
|
||||
);
|
||||
if (m_frame % m_update_physics == 0 && SynchronizeScene != null)
|
||||
SynchronizeScene(this);
|
||||
|
||||
physicsMS = Environment.TickCount - physicsMS;
|
||||
physicsMS += physicsMS2;
|
||||
|
||||
|
||||
otherMS = Environment.TickCount;
|
||||
// run through all entities looking for updates (slow)
|
||||
@@ -949,6 +932,25 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (m_frame % m_update_presences == 0)
|
||||
m_sceneGraph.UpdatePresences();
|
||||
|
||||
physicsMS2 = Environment.TickCount;
|
||||
if ((m_frame % m_update_physics == 0) && m_physics_enabled)
|
||||
m_sceneGraph.UpdatePreparePhysics();
|
||||
physicsMS2 = Environment.TickCount - physicsMS2;
|
||||
|
||||
if (m_frame % m_update_entitymovement == 0)
|
||||
m_sceneGraph.UpdateEntityMovement();
|
||||
|
||||
physicsMS = Environment.TickCount;
|
||||
if ((m_frame % m_update_physics == 0) && m_physics_enabled)
|
||||
physicsFPS = m_sceneGraph.UpdatePhysics(
|
||||
Math.Max(SinceLastFrame.TotalSeconds, m_timespan)
|
||||
);
|
||||
if (m_frame % m_update_physics == 0 && SynchronizeScene != null)
|
||||
SynchronizeScene(this);
|
||||
|
||||
physicsMS = Environment.TickCount - physicsMS;
|
||||
physicsMS += physicsMS2;
|
||||
|
||||
// Delete temp-on-rez stuff
|
||||
if (m_frame % m_update_backup == 0)
|
||||
CleanTempObjects();
|
||||
|
||||
Reference in New Issue
Block a user