diff options
author | Robert Adams | 2013-06-11 17:18:12 -0700 |
---|---|---|
committer | Robert Adams | 2013-06-11 17:18:12 -0700 |
commit | 7556a0f699f8474b7ac23cbebacc695c93f374fa (patch) | |
tree | 58cbcb98112de67727e1efc39322799cbc5ca466 /OpenSim | |
parent | Uncomment Mic's code and split to create new regression TestAddTemporaryAsset... (diff) | |
download | opensim-SC_OLD-7556a0f699f8474b7ac23cbebacc695c93f374fa.zip opensim-SC_OLD-7556a0f699f8474b7ac23cbebacc695c93f374fa.tar.gz opensim-SC_OLD-7556a0f699f8474b7ac23cbebacc695c93f374fa.tar.bz2 opensim-SC_OLD-7556a0f699f8474b7ac23cbebacc695c93f374fa.tar.xz |
Add TriggerScenePresenceUpdated events when an animation is added
or removed. Shouldn't impact anyone as only DSG seems to use
OnScenePresenceUpdated event.
Some minor format changes to AnimationSet's ToString().
Diffstat (limited to 'OpenSim')
4 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Framework/Animation.cs b/OpenSim/Framework/Animation.cs index 8bdf8f4..3425505 100644 --- a/OpenSim/Framework/Animation.cs +++ b/OpenSim/Framework/Animation.cs | |||
@@ -125,11 +125,10 @@ namespace OpenSim.Framework | |||
125 | Animation other = obj as Animation; | 125 | Animation other = obj as Animation; |
126 | if (other != null) | 126 | if (other != null) |
127 | { | 127 | { |
128 | return (other.AnimID == this.AnimID | 128 | return (other.AnimID.Equals(this.AnimID) |
129 | && other.SequenceNum == this.SequenceNum | 129 | && other.SequenceNum == this.SequenceNum |
130 | && other.ObjectID == this.ObjectID); | 130 | && other.ObjectID.Equals(this.ObjectID) ); |
131 | } | 131 | } |
132 | |||
133 | return base.Equals(obj); | 132 | return base.Equals(obj); |
134 | } | 133 | } |
135 | 134 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs index 5dee64d..b7400ea 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | |||
@@ -312,18 +312,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
312 | buff.Append("dflt="); | 312 | buff.Append("dflt="); |
313 | buff.Append(DefaultAnimation.ToString()); | 313 | buff.Append(DefaultAnimation.ToString()); |
314 | buff.Append(",iDflt="); | 314 | buff.Append(",iDflt="); |
315 | if (DefaultAnimation == ImplicitDefaultAnimation) | 315 | if (DefaultAnimation.Equals(ImplicitDefaultAnimation)) |
316 | buff.Append("same"); | 316 | buff.Append("same"); |
317 | else | 317 | else |
318 | buff.Append(ImplicitDefaultAnimation.ToString()); | 318 | buff.Append(ImplicitDefaultAnimation.ToString()); |
319 | if (m_animations.Count > 0) | 319 | if (m_animations.Count > 0) |
320 | { | 320 | { |
321 | buff.Append(",anims="); | 321 | buff.Append(",anims="); |
322 | bool firstTime = true; | ||
322 | foreach (OpenSim.Framework.Animation anim in m_animations) | 323 | foreach (OpenSim.Framework.Animation anim in m_animations) |
323 | { | 324 | { |
325 | if (!firstTime) | ||
326 | buff.Append(","); | ||
324 | buff.Append("<"); | 327 | buff.Append("<"); |
325 | buff.Append(anim.ToString()); | 328 | buff.Append(anim.ToString()); |
326 | buff.Append(">,"); | 329 | buff.Append(">"); |
330 | firstTime = false; | ||
327 | } | 331 | } |
328 | } | 332 | } |
329 | return buff.ToString(); | 333 | return buff.ToString(); |
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index a701a79..3b5a5bd 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -94,6 +94,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
94 | if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) | 94 | if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) |
95 | { | 95 | { |
96 | SendAnimPack(); | 96 | SendAnimPack(); |
97 | m_scenePresence.TriggerScenePresenceUpdated(); | ||
97 | } | 98 | } |
98 | } | 99 | } |
99 | 100 | ||
@@ -135,6 +136,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
135 | if (m_animations.Remove(animID, allowNoDefault)) | 136 | if (m_animations.Remove(animID, allowNoDefault)) |
136 | { | 137 | { |
137 | SendAnimPack(); | 138 | SendAnimPack(); |
139 | m_scenePresence.TriggerScenePresenceUpdated(); | ||
138 | } | 140 | } |
139 | } | 141 | } |
140 | 142 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index bab14dd..774546c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
77 | // m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); | 77 | // m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); |
78 | // } | 78 | // } |
79 | 79 | ||
80 | private void TriggerScenePresenceUpdated() | 80 | public void TriggerScenePresenceUpdated() |
81 | { | 81 | { |
82 | if (m_scene != null) | 82 | if (m_scene != null) |
83 | m_scene.EventManager.TriggerScenePresenceUpdated(this); | 83 | m_scene.EventManager.TriggerScenePresenceUpdated(this); |