diff options
Merge branch 'master' of /home/opensim/var/repo/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 28 |
1 files changed, 11 insertions, 17 deletions
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 | { |