diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index bad2b21..0360942 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1257,7 +1257,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
1257 | 1257 | ||
1258 | try | 1258 | try |
1259 | { | 1259 | { |
1260 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | ||
1261 | if ((Frame % m_update_physics == 0) && m_physics_enabled) | ||
1262 | m_sceneGraph.UpdatePreparePhysics(); | ||
1263 | physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2); | ||
1264 | |||
1265 | // Apply any pending avatar force input to the avatar's velocity | ||
1260 | int tmpAgentMS = Util.EnvironmentTickCount(); | 1266 | int tmpAgentMS = Util.EnvironmentTickCount(); |
1267 | if (Frame % m_update_entitymovement == 0) | ||
1268 | m_sceneGraph.UpdateScenePresenceMovement(); | ||
1269 | agentMS = Util.EnvironmentTickCountSubtract(tmpAgentMS); | ||
1270 | |||
1271 | // Perform the main physics update. This will do the actual work of moving objects and avatars according to their | ||
1272 | // velocity | ||
1273 | int tmpPhysicsMS = Util.EnvironmentTickCount(); | ||
1274 | if (Frame % m_update_physics == 0) | ||
1275 | { | ||
1276 | if (m_physics_enabled) | ||
1277 | physicsFPS = m_sceneGraph.UpdatePhysics(MinFrameTime); | ||
1278 | |||
1279 | if (SynchronizeScene != null) | ||
1280 | SynchronizeScene(this); | ||
1281 | } | ||
1282 | physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS); | ||
1283 | |||
1284 | tmpAgentMS = Util.EnvironmentTickCount(); | ||
1261 | 1285 | ||
1262 | // Check if any objects have reached their targets | 1286 | // Check if any objects have reached their targets |
1263 | CheckAtTargets(); | 1287 | CheckAtTargets(); |
@@ -1285,33 +1309,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1285 | }); | 1309 | }); |
1286 | } | 1310 | } |
1287 | 1311 | ||
1288 | agentMS = Util.EnvironmentTickCountSubtract(tmpAgentMS); | 1312 | agentMS += Util.EnvironmentTickCountSubtract(tmpAgentMS); |
1289 | |||
1290 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | ||
1291 | if ((Frame % m_update_physics == 0) && m_physics_enabled) | ||
1292 | m_sceneGraph.UpdatePreparePhysics(); | ||
1293 | physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2); | ||
1294 | |||
1295 | // Apply any pending avatar force input to the avatar's velocity | ||
1296 | if (Frame % m_update_entitymovement == 0) | ||
1297 | { | ||
1298 | tmpAgentMS = Util.EnvironmentTickCount(); | ||
1299 | m_sceneGraph.UpdateScenePresenceMovement(); | ||
1300 | agentMS += Util.EnvironmentTickCountSubtract(tmpAgentMS); | ||
1301 | } | ||
1302 | |||
1303 | // Perform the main physics update. This will do the actual work of moving objects and avatars according to their | ||
1304 | // velocity | ||
1305 | int tmpPhysicsMS = Util.EnvironmentTickCount(); | ||
1306 | if (Frame % m_update_physics == 0) | ||
1307 | { | ||
1308 | if (m_physics_enabled) | ||
1309 | physicsFPS = m_sceneGraph.UpdatePhysics(MinFrameTime); | ||
1310 | |||
1311 | if (SynchronizeScene != null) | ||
1312 | SynchronizeScene(this); | ||
1313 | } | ||
1314 | physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS); | ||
1315 | 1313 | ||
1316 | // Delete temp-on-rez stuff | 1314 | // Delete temp-on-rez stuff |
1317 | if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) | 1315 | if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) |