aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2009-04-11 16:51:27 +0000
committerMelanie Thielker2009-04-11 16:51:27 +0000
commit217b2d93ae77925e9ebbb0ef3e9b44d47e4234db (patch)
treedabfaa379dec57167e8a34a67f1089d2c2bd367f /OpenSim/Region/Framework/Scenes
parent* Minor MRM Cleanup (diff)
downloadopensim-SC-217b2d93ae77925e9ebbb0ef3e9b44d47e4234db.zip
opensim-SC-217b2d93ae77925e9ebbb0ef3e9b44d47e4234db.tar.gz
opensim-SC-217b2d93ae77925e9ebbb0ef3e9b44d47e4234db.tar.bz2
opensim-SC-217b2d93ae77925e9ebbb0ef3e9b44d47e4234db.tar.xz
Adding a script event, changed(CHANGED_ANIMATION)
This is sent to all root prims of all attachments of an avatar when the animation state changes. llGetAnimation() can thenbe used to find the new movement animation. This eliminates the need for fast timers in AOs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 2c316a6..d06c583 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -223,6 +223,8 @@ namespace OpenSim.Region.Framework.Scenes
223 string m_callbackURI; 223 string m_callbackURI;
224 ulong m_rootRegionHandle; 224 ulong m_rootRegionHandle;
225 225
226 private IScriptModule[] m_scriptEngines;
227
226 #region Properties 228 #region Properties
227 229
228 /// <summary> 230 /// <summary>
@@ -585,6 +587,8 @@ namespace OpenSim.Region.Framework.Scenes
585 if (gm != null) 587 if (gm != null)
586 m_grouptitle = gm.GetGroupTitle(m_uuid); 588 m_grouptitle = gm.GetGroupTitle(m_uuid);
587 589
590 m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>();
591
588 AbsolutePosition = m_controllingClient.StartPos; 592 AbsolutePosition = m_controllingClient.StartPos;
589 AdjustKnownSeeds(); 593 AdjustKnownSeeds();
590 594
@@ -1943,7 +1947,24 @@ namespace OpenSim.Region.Framework.Scenes
1943 1947
1944 if (m_animations.TrySetDefaultAnimation(anim, m_controllingClient.NextAnimationSequenceNumber, UUID.Zero)) 1948 if (m_animations.TrySetDefaultAnimation(anim, m_controllingClient.NextAnimationSequenceNumber, UUID.Zero))
1945 { 1949 {
1946 SendAnimPack(); 1950 if (m_scriptEngines != null)
1951 {
1952 lock (m_attachments)
1953 {
1954 foreach (SceneObjectGroup grp in m_attachments)
1955 {
1956 // 16384 is CHANGED_ANIMATION
1957 //
1958 // Send this to all attachment root prims
1959 //
1960 foreach (IScriptModule m in m_scriptEngines)
1961 {
1962 m.PostObjectEvent(grp.RootPart.UUID, "changed", new Object[] {16384});
1963 }
1964 SendAnimPack();
1965 }
1966 }
1967 }
1947 } 1968 }
1948 } 1969 }
1949 1970