diff options
author | Justin Clark-Casey (justincc) | 2011-12-02 23:56:01 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-12-02 23:56:01 +0000 |
commit | 054ebe8878cbd1552fe96c0df631f50d5c2409d3 (patch) | |
tree | 4c0231e4fb7d0f830397ed7feb4319c153d3c9c4 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Remove pointless Animator.TrySetMovementAnimation("STAND") in ScenePresnece c... (diff) | |
download | opensim-SC-054ebe8878cbd1552fe96c0df631f50d5c2409d3.zip opensim-SC-054ebe8878cbd1552fe96c0df631f50d5c2409d3.tar.gz opensim-SC-054ebe8878cbd1552fe96c0df631f50d5c2409d3.tar.bz2 opensim-SC-054ebe8878cbd1552fe96c0df631f50d5c2409d3.tar.xz |
Stop some places where we're trying to reset animations in child agents where such requests are ignored.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1c2025c..b93b67d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -995,13 +995,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
995 | 995 | ||
996 | /// <summary> | 996 | /// <summary> |
997 | /// This turns a root agent into a child agent | 997 | /// This turns a root agent into a child agent |
998 | /// </summary> | ||
999 | /// <remarks> | ||
998 | /// 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. |
999 | /// | 1001 | /// |
1000 | /// 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 |
1001 | /// teleports out may not end up anywhere near this region | 1003 | /// teleports out may not end up anywhere near this region |
1002 | /// </summary> | 1004 | /// </remarks> |
1003 | public void MakeChildAgent() | 1005 | public void MakeChildAgent() |
1004 | { | 1006 | { |
1007 | m_log.DebugFormat("[SCENE PRESENCE]: Making {0} a child agent in {1}", Name, Scene.RegionInfo.RegionName); | ||
1008 | |||
1005 | // 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 |
1006 | // as teleporting back | 1010 | // as teleporting back |
1007 | TeleportFlags = TeleportFlags.Default; | 1011 | TeleportFlags = TeleportFlags.Default; |
@@ -2295,11 +2299,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2295 | { | 2299 | { |
2296 | 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. |
2297 | Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); | 2301 | Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); |
2298 | |||
2299 | // TODO: This doesn't prevent the user from walking yet. | ||
2300 | // Setting parent ID would fix this, if we knew what value | ||
2301 | // to use. Or we could add a m_isSitting variable. | ||
2302 | //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); | ||
2303 | SitGround = true; | 2302 | SitGround = true; |
2304 | RemoveFromPhysicalScene(); | 2303 | RemoveFromPhysicalScene(); |
2305 | } | 2304 | } |
@@ -2908,9 +2907,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2908 | 2907 | ||
2909 | public void Reset() | 2908 | public void Reset() |
2910 | { | 2909 | { |
2910 | // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); | ||
2911 | |||
2911 | // Put the child agent back at the center | 2912 | // Put the child agent back at the center |
2912 | AbsolutePosition | 2913 | AbsolutePosition |
2913 | = 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 | |||
2914 | Animator.ResetAnimations(); | 2916 | Animator.ResetAnimations(); |
2915 | } | 2917 | } |
2916 | 2918 | ||
@@ -3133,7 +3135,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3133 | } | 3135 | } |
3134 | } | 3136 | } |
3135 | 3137 | ||
3136 | public void CopyFrom(AgentData cAgent) | 3138 | private void CopyFrom(AgentData cAgent) |
3137 | { | 3139 | { |
3138 | m_originRegionID = cAgent.RegionID; | 3140 | m_originRegionID = cAgent.RegionID; |
3139 | 3141 | ||
@@ -3192,13 +3194,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3192 | } | 3194 | } |
3193 | } | 3195 | } |
3194 | catch { } | 3196 | catch { } |
3195 | // Animations | 3197 | |
3196 | try | 3198 | Animator.Animations.FromArray(cAgent.Anims); |
3197 | { | ||
3198 | Animator.ResetAnimations(); | ||
3199 | Animator.Animations.FromArray(cAgent.Anims); | ||
3200 | } | ||
3201 | catch { } | ||
3202 | 3199 | ||
3203 | if (cAgent.AttachmentObjects != null && cAgent.AttachmentObjects.Count > 0) | 3200 | if (cAgent.AttachmentObjects != null && cAgent.AttachmentObjects.Count > 0) |
3204 | { | 3201 | { |