aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorDan Lake2011-10-06 12:22:15 -0700
committerDan Lake2011-10-06 12:22:15 -0700
commit08f264d096e1dca535a64e683fa5ab5918368085 (patch)
tree0e898f21be0cca8a6249f78e534c9ec3a98528e2 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentRefactor ScenePresence so gets and sets are through properties. Added private... (diff)
parentAdded back UserAccount that creates random UUID for new account. (diff)
downloadopensim-SC_OLD-08f264d096e1dca535a64e683fa5ab5918368085.zip
opensim-SC_OLD-08f264d096e1dca535a64e683fa5ab5918368085.tar.gz
opensim-SC_OLD-08f264d096e1dca535a64e683fa5ab5918368085.tar.bz2
opensim-SC_OLD-08f264d096e1dca535a64e683fa5ab5918368085.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Conflicts: OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs32
1 files changed, 3 insertions, 29 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0290576..ce63946 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -870,11 +870,7 @@ namespace OpenSim.Region.Framework.Scenes
870 /// </summary> 870 /// </summary>
871 public void SendPrimUpdates() 871 public void SendPrimUpdates()
872 { 872 {
873 m_perfMonMS = Util.EnvironmentTickCount();
874
875 SceneViewer.SendPrimUpdates(); 873 SceneViewer.SendPrimUpdates();
876
877 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
878 } 874 }
879 875
880 #region Status Methods 876 #region Status Methods
@@ -1276,7 +1272,7 @@ namespace OpenSim.Region.Framework.Scenes
1276 // return; 1272 // return;
1277 //} 1273 //}
1278 1274
1279 m_perfMonMS = Util.EnvironmentTickCount(); 1275// m_perfMonMS = Util.EnvironmentTickCount();
1280 1276
1281 ++m_movementUpdateCount; 1277 ++m_movementUpdateCount;
1282 if (m_movementUpdateCount < 1) 1278 if (m_movementUpdateCount < 1)
@@ -1565,7 +1561,8 @@ namespace OpenSim.Region.Framework.Scenes
1565 1561
1566 m_scene.EventManager.TriggerOnClientMovement(this); 1562 m_scene.EventManager.TriggerOnClientMovement(this);
1567 1563
1568 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); 1564 // It doesn't make sense to add this to frame stats as this update is processed indepedently of the scene loop
1565// m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
1569 } 1566 }
1570 1567
1571 /// <summary> 1568 /// <summary>
@@ -2341,8 +2338,6 @@ namespace OpenSim.Region.Framework.Scenes
2341 /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> 2338 /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param>
2342 public void AddNewMovement(Vector3 vec) 2339 public void AddNewMovement(Vector3 vec)
2343 { 2340 {
2344 m_perfMonMS = Util.EnvironmentTickCount();
2345
2346 Vector3 direc = vec * Rotation; 2341 Vector3 direc = vec * Rotation;
2347 direc.Normalize(); 2342 direc.Normalize();
2348 2343
@@ -2379,8 +2374,6 @@ namespace OpenSim.Region.Framework.Scenes
2379 2374
2380 // TODO: Add the force instead of only setting it to support multiple forces per frame? 2375 // TODO: Add the force instead of only setting it to support multiple forces per frame?
2381 m_forceToApply = direc; 2376 m_forceToApply = direc;
2382
2383 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2384 } 2377 }
2385 2378
2386 #endregion 2379 #endregion
@@ -2443,8 +2436,6 @@ namespace OpenSim.Region.Framework.Scenes
2443 // server. 2436 // server.
2444 if (remoteClient.IsActive) 2437 if (remoteClient.IsActive)
2445 { 2438 {
2446 m_perfMonMS = Util.EnvironmentTickCount();
2447
2448 Vector3 pos = m_pos; 2439 Vector3 pos = m_pos;
2449 pos.Z += Appearance.HipOffset; 2440 pos.Z += Appearance.HipOffset;
2450 2441
@@ -2455,7 +2446,6 @@ namespace OpenSim.Region.Framework.Scenes
2455 PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity 2446 PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
2456 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); 2447 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
2457 2448
2458 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2459 m_scene.StatsReporter.AddAgentUpdates(1); 2449 m_scene.StatsReporter.AddAgentUpdates(1);
2460 } 2450 }
2461 } 2451 }
@@ -2496,14 +2486,11 @@ namespace OpenSim.Region.Framework.Scenes
2496 || Math.Abs(distanceError) > distanceErrorThreshold 2486 || Math.Abs(distanceError) > distanceErrorThreshold
2497 || velocidyDiff > 0.01f) // did velocity change from last update? 2487 || velocidyDiff > 0.01f) // did velocity change from last update?
2498 { 2488 {
2499 m_perfMonMS = currentTick;
2500 lastVelocitySentToAllClients = Velocity; 2489 lastVelocitySentToAllClients = Velocity;
2501 lastTerseUpdateToAllClientsTick = currentTick; 2490 lastTerseUpdateToAllClientsTick = currentTick;
2502 lastPositionSentToAllClients = OffsetPosition; 2491 lastPositionSentToAllClients = OffsetPosition;
2503 2492
2504 m_scene.ForEachClient(SendTerseUpdateToClient); 2493 m_scene.ForEachClient(SendTerseUpdateToClient);
2505
2506 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2507 } 2494 }
2508 } 2495 }
2509 2496
@@ -2524,9 +2511,7 @@ namespace OpenSim.Region.Framework.Scenes
2524 2511
2525 public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p, List<Vector3> coarseLocations, List<UUID> avatarUUIDs) 2512 public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p, List<Vector3> coarseLocations, List<UUID> avatarUUIDs)
2526 { 2513 {
2527 m_perfMonMS = Util.EnvironmentTickCount();
2528 ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations); 2514 ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations);
2529 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2530 } 2515 }
2531 2516
2532 /// <summary> 2517 /// <summary>
@@ -2587,8 +2572,6 @@ namespace OpenSim.Region.Framework.Scenes
2587 m_log.Warn("[SCENE PRESENCE] attempt to send avatar data from a child agent"); 2572 m_log.Warn("[SCENE PRESENCE] attempt to send avatar data from a child agent");
2588 return; 2573 return;
2589 } 2574 }
2590
2591 m_perfMonMS = Util.EnvironmentTickCount();
2592 2575
2593 int count = 0; 2576 int count = 0;
2594 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) 2577 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
@@ -2598,7 +2581,6 @@ namespace OpenSim.Region.Framework.Scenes
2598 }); 2581 });
2599 2582
2600 m_scene.StatsReporter.AddAgentUpdates(count); 2583 m_scene.StatsReporter.AddAgentUpdates(count);
2601 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2602 } 2584 }
2603 2585
2604 /// <summary> 2586 /// <summary>
@@ -2607,8 +2589,6 @@ namespace OpenSim.Region.Framework.Scenes
2607 /// </summary> 2589 /// </summary>
2608 public void SendOtherAgentsAvatarDataToMe() 2590 public void SendOtherAgentsAvatarDataToMe()
2609 { 2591 {
2610 m_perfMonMS = Util.EnvironmentTickCount();
2611
2612 int count = 0; 2592 int count = 0;
2613 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) 2593 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
2614 { 2594 {
@@ -2625,7 +2605,6 @@ namespace OpenSim.Region.Framework.Scenes
2625 }); 2605 });
2626 2606
2627 m_scene.StatsReporter.AddAgentUpdates(count); 2607 m_scene.StatsReporter.AddAgentUpdates(count);
2628 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2629 } 2608 }
2630 2609
2631 /// <summary> 2610 /// <summary>
@@ -2654,8 +2633,6 @@ namespace OpenSim.Region.Framework.Scenes
2654 m_log.Warn("[SCENE PRESENCE] attempt to send avatar data from a child agent"); 2633 m_log.Warn("[SCENE PRESENCE] attempt to send avatar data from a child agent");
2655 return; 2634 return;
2656 } 2635 }
2657
2658 m_perfMonMS = Util.EnvironmentTickCount();
2659 2636
2660 int count = 0; 2637 int count = 0;
2661 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) 2638 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
@@ -2668,7 +2645,6 @@ namespace OpenSim.Region.Framework.Scenes
2668 }); 2645 });
2669 2646
2670 m_scene.StatsReporter.AddAgentUpdates(count); 2647 m_scene.StatsReporter.AddAgentUpdates(count);
2671 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2672 } 2648 }
2673 2649
2674 /// <summary> 2650 /// <summary>
@@ -2678,7 +2654,6 @@ namespace OpenSim.Region.Framework.Scenes
2678 public void SendOtherAgentsAppearanceToMe() 2654 public void SendOtherAgentsAppearanceToMe()
2679 { 2655 {
2680 //m_log.DebugFormat("[SCENE PRESENCE] SendOtherAgentsAppearanceToMe: {0} ({1})", Name, UUID); 2656 //m_log.DebugFormat("[SCENE PRESENCE] SendOtherAgentsAppearanceToMe: {0} ({1})", Name, UUID);
2681 m_perfMonMS = Util.EnvironmentTickCount();
2682 2657
2683 int count = 0; 2658 int count = 0;
2684 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) 2659 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
@@ -2696,7 +2671,6 @@ namespace OpenSim.Region.Framework.Scenes
2696 }); 2671 });
2697 2672
2698 m_scene.StatsReporter.AddAgentUpdates(count); 2673 m_scene.StatsReporter.AddAgentUpdates(count);
2699 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2700 } 2674 }
2701 2675
2702 /// <summary> 2676 /// <summary>