diff options
author | Kitto Flora | 2010-03-19 19:14:09 -0400 |
---|---|---|
committer | Kitto Flora | 2010-03-19 19:14:09 -0400 |
commit | 0f5fb6f1901b0950ac52446702b07c91d16724d7 (patch) | |
tree | 72305ac8d95eccd4e7432538f061429e25e3418d /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Fix AbsolutePosition for autopilot/sit. (diff) | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC-0f5fb6f1901b0950ac52446702b07c91d16724d7.zip opensim-SC-0f5fb6f1901b0950ac52446702b07c91d16724d7.tar.gz opensim-SC-0f5fb6f1901b0950ac52446702b07c91d16724d7.tar.bz2 opensim-SC-0f5fb6f1901b0950ac52446702b07c91d16724d7.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 608e84c..1e530e1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -881,7 +881,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
881 | if (land != null) | 881 | if (land != null) |
882 | { | 882 | { |
883 | //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni. | 883 | //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni. |
884 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero && m_godLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid) && land.LandData.OwnerID != m_uuid) | 884 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero && m_userLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid) && land.LandData.OwnerID != m_uuid) |
885 | { | 885 | { |
886 | pos = land.LandData.UserLocation; | 886 | pos = land.LandData.UserLocation; |
887 | } | 887 | } |
@@ -959,14 +959,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
959 | 959 | ||
960 | m_isChildAgent = false; | 960 | m_isChildAgent = false; |
961 | 961 | ||
962 | ScenePresence[] animAgents = m_scene.GetScenePresences(); | 962 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) |
963 | for (int i = 0; i < animAgents.Length; i++) | ||
964 | { | 963 | { |
965 | ScenePresence presence = animAgents[i]; | ||
966 | |||
967 | if (presence != this) | 964 | if (presence != this) |
968 | presence.Animator.SendAnimPackToClient(ControllingClient); | 965 | presence.Animator.SendAnimPackToClient(ControllingClient); |
969 | } | 966 | }); |
970 | 967 | ||
971 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 968 | m_scene.EventManager.TriggerOnMakeRootAgent(this); |
972 | } | 969 | } |
@@ -2671,13 +2668,10 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2671 | public void SendInitialFullUpdateToAllClients() | 2668 | public void SendInitialFullUpdateToAllClients() |
2672 | { | 2669 | { |
2673 | m_perfMonMS = Util.EnvironmentTickCount(); | 2670 | m_perfMonMS = Util.EnvironmentTickCount(); |
2674 | 2671 | int avUpdates = 0; | |
2675 | ScenePresence[] avatars = m_scene.GetScenePresences(); | 2672 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
2676 | |||
2677 | for (int i = 0; i < avatars.Length; i++) | ||
2678 | { | 2673 | { |
2679 | ScenePresence avatar = avatars[i]; | 2674 | ++avUpdates; |
2680 | |||
2681 | // only send if this is the root (children are only "listening posts" in a foreign region) | 2675 | // only send if this is the root (children are only "listening posts" in a foreign region) |
2682 | if (!IsChildAgent) | 2676 | if (!IsChildAgent) |
2683 | { | 2677 | { |
@@ -2693,9 +2687,9 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2693 | avatar.Animator.SendAnimPackToClient(ControllingClient); | 2687 | avatar.Animator.SendAnimPackToClient(ControllingClient); |
2694 | } | 2688 | } |
2695 | } | 2689 | } |
2696 | } | 2690 | }); |
2697 | 2691 | ||
2698 | m_scene.StatsReporter.AddAgentUpdates(avatars.Length); | 2692 | m_scene.StatsReporter.AddAgentUpdates(avUpdates); |
2699 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); | 2693 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); |
2700 | 2694 | ||
2701 | //Animator.SendAnimPack(); | 2695 | //Animator.SendAnimPack(); |