Merge branch 'master' into bigmerge

avinationmerge
Melanie 2011-10-31 10:53:17 +00:00
commit 4002e205cb
1 changed files with 25 additions and 27 deletions

View File

@ -1257,7 +1257,31 @@ namespace OpenSim.Region.Framework.Scenes
try try
{ {
int tmpPhysicsMS2 = Util.EnvironmentTickCount();
if ((Frame % m_update_physics == 0) && m_physics_enabled)
m_sceneGraph.UpdatePreparePhysics();
physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
// Apply any pending avatar force input to the avatar's velocity
int tmpAgentMS = Util.EnvironmentTickCount(); int tmpAgentMS = Util.EnvironmentTickCount();
if (Frame % m_update_entitymovement == 0)
m_sceneGraph.UpdateScenePresenceMovement();
agentMS = Util.EnvironmentTickCountSubtract(tmpAgentMS);
// Perform the main physics update. This will do the actual work of moving objects and avatars according to their
// velocity
int tmpPhysicsMS = Util.EnvironmentTickCount();
if (Frame % m_update_physics == 0)
{
if (m_physics_enabled)
physicsFPS = m_sceneGraph.UpdatePhysics(MinFrameTime);
if (SynchronizeScene != null)
SynchronizeScene(this);
}
physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS);
tmpAgentMS = Util.EnvironmentTickCount();
// Check if any objects have reached their targets // Check if any objects have reached their targets
CheckAtTargets(); CheckAtTargets();
@ -1285,33 +1309,7 @@ namespace OpenSim.Region.Framework.Scenes
}); });
} }
agentMS = Util.EnvironmentTickCountSubtract(tmpAgentMS);
int tmpPhysicsMS2 = Util.EnvironmentTickCount();
if ((Frame % m_update_physics == 0) && m_physics_enabled)
m_sceneGraph.UpdatePreparePhysics();
physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
// Apply any pending avatar force input to the avatar's velocity
if (Frame % m_update_entitymovement == 0)
{
tmpAgentMS = Util.EnvironmentTickCount();
m_sceneGraph.UpdateScenePresenceMovement();
agentMS += Util.EnvironmentTickCountSubtract(tmpAgentMS); agentMS += Util.EnvironmentTickCountSubtract(tmpAgentMS);
}
// Perform the main physics update. This will do the actual work of moving objects and avatars according to their
// velocity
int tmpPhysicsMS = Util.EnvironmentTickCount();
if (Frame % m_update_physics == 0)
{
if (m_physics_enabled)
physicsFPS = m_sceneGraph.UpdatePhysics(MinFrameTime);
if (SynchronizeScene != null)
SynchronizeScene(this);
}
physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS);
// Delete temp-on-rez stuff // Delete temp-on-rez stuff
if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps)