aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs28
3 files changed, 23 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 4cf854e..6b1208c 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -131,8 +131,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation
131 131
132 public void ResetAnimations() 132 public void ResetAnimations()
133 { 133 {
134// m_log.DebugFormat(
135// "[SCENE PRESENCE ANIMATOR]: Resetting animations for {0} in {1}",
136// m_scenePresence.Name, m_scenePresence.Scene.RegionInfo.RegionName);
137
134 m_animations.Clear(); 138 m_animations.Clear();
135 TrySetMovementAnimation("STAND");
136 } 139 }
137 140
138 /// <summary> 141 /// <summary>
@@ -155,6 +158,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
155 SendAnimPack(); 158 SendAnimPack();
156 } 159 }
157 } 160 }
161 // Don't leave this on since on teleports SP.HandleAgentUpdate() still hammers us for a while after it teleports
162// else
163// {
164// m_log.WarnFormat(
165// "[SCENE PRESENCE ANIMATOR]: Tried to set movement animation {0} on child presence {1}",
166// anim, m_scenePresence.Name);
167// throw new Exception(string.Format("aaargh on setting {0}", anim));
168// }
158 } 169 }
159 170
160 /// <summary> 171 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 9a71cd4..3ac6327 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3700,7 +3700,6 @@ namespace OpenSim.Region.Framework.Scenes
3700 return false; 3700 return false;
3701 } 3701 }
3702 3702
3703
3704 ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); 3703 ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
3705 3704
3706 if (childAgentUpdate != null) 3705 if (childAgentUpdate != null)
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index c2d3501..b93b67d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -782,9 +782,6 @@ namespace OpenSim.Region.Framework.Scenes
782 782
783 AdjustKnownSeeds(); 783 AdjustKnownSeeds();
784 784
785 // TODO: I think, this won't send anything, as we are still a child here...
786 Animator.TrySetMovementAnimation("STAND");
787
788 // we created a new ScenePresence (a new child agent) in a fresh region. 785 // we created a new ScenePresence (a new child agent) in a fresh region.
789 // Request info about all the (root) agents in this region 786 // Request info about all the (root) agents in this region
790 // Note: This won't send data *to* other clients in that region (children don't send) 787 // Note: This won't send data *to* other clients in that region (children don't send)
@@ -998,13 +995,17 @@ namespace OpenSim.Region.Framework.Scenes
998 995
999 /// <summary> 996 /// <summary>
1000 /// This turns a root agent into a child agent 997 /// This turns a root agent into a child agent
998 /// </summary>
999 /// <remarks>
1001 /// when an agent departs this region for a neighbor, this gets called. 1000 /// when an agent departs this region for a neighbor, this gets called.
1002 /// 1001 ///
1003 /// It doesn't get called for a teleport. Reason being, an agent that 1002 /// It doesn't get called for a teleport. Reason being, an agent that
1004 /// teleports out may not end up anywhere near this region 1003 /// teleports out may not end up anywhere near this region
1005 /// </summary> 1004 /// </remarks>
1006 public void MakeChildAgent() 1005 public void MakeChildAgent()
1007 { 1006 {
1007 m_log.DebugFormat("[SCENE PRESENCE]: Making {0} a child agent in {1}", Name, Scene.RegionInfo.RegionName);
1008
1008 // Reset these so that teleporting in and walking out isn't seen 1009 // Reset these so that teleporting in and walking out isn't seen
1009 // as teleporting back 1010 // as teleporting back
1010 TeleportFlags = TeleportFlags.Default; 1011 TeleportFlags = TeleportFlags.Default;
@@ -2298,11 +2299,6 @@ namespace OpenSim.Region.Framework.Scenes
2298 { 2299 {
2299 m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick. 2300 m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.
2300 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); 2301 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
2301
2302 // TODO: This doesn't prevent the user from walking yet.
2303 // Setting parent ID would fix this, if we knew what value
2304 // to use. Or we could add a m_isSitting variable.
2305 //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
2306 SitGround = true; 2302 SitGround = true;
2307 RemoveFromPhysicalScene(); 2303 RemoveFromPhysicalScene();
2308 } 2304 }
@@ -2911,9 +2907,12 @@ namespace OpenSim.Region.Framework.Scenes
2911 2907
2912 public void Reset() 2908 public void Reset()
2913 { 2909 {
2910// m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName);
2911
2914 // Put the child agent back at the center 2912 // Put the child agent back at the center
2915 AbsolutePosition 2913 AbsolutePosition
2916 = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 70); 2914 = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 70);
2915
2917 Animator.ResetAnimations(); 2916 Animator.ResetAnimations();
2918 } 2917 }
2919 2918
@@ -3136,7 +3135,7 @@ namespace OpenSim.Region.Framework.Scenes
3136 } 3135 }
3137 } 3136 }
3138 3137
3139 public void CopyFrom(AgentData cAgent) 3138 private void CopyFrom(AgentData cAgent)
3140 { 3139 {
3141 m_originRegionID = cAgent.RegionID; 3140 m_originRegionID = cAgent.RegionID;
3142 3141
@@ -3195,13 +3194,8 @@ namespace OpenSim.Region.Framework.Scenes
3195 } 3194 }
3196 } 3195 }
3197 catch { } 3196 catch { }
3198 // Animations 3197
3199 try 3198 Animator.Animations.FromArray(cAgent.Anims);
3200 {
3201 Animator.ResetAnimations();
3202 Animator.Animations.FromArray(cAgent.Anims);
3203 }
3204 catch { }
3205 3199
3206 if (cAgent.AttachmentObjects != null && cAgent.AttachmentObjects.Count > 0) 3200 if (cAgent.AttachmentObjects != null && cAgent.AttachmentObjects.Count > 0)
3207 { 3201 {