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 | |
parent | Remove pointless Animator.TrySetMovementAnimation("STAND") in ScenePresnece c... (diff) | |
download | opensim-SC_OLD-054ebe8878cbd1552fe96c0df631f50d5c2409d3.zip opensim-SC_OLD-054ebe8878cbd1552fe96c0df631f50d5c2409d3.tar.gz opensim-SC_OLD-054ebe8878cbd1552fe96c0df631f50d5c2409d3.tar.bz2 opensim-SC_OLD-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')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 25 |
3 files changed, 23 insertions, 16 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 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 | { |