diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fc3166a..a488f59 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1754,18 +1754,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1754 | } | 1754 | } |
1755 | } | 1755 | } |
1756 | 1756 | ||
1757 | public void AddAnimation(UUID animID) | 1757 | public void AddAnimation(UUID animID, UUID objectID) |
1758 | { | 1758 | { |
1759 | if (m_isChildAgent) | 1759 | if (m_isChildAgent) |
1760 | return; | 1760 | return; |
1761 | 1761 | ||
1762 | if (m_animations.Add(animID, m_controllingClient.NextAnimationSequenceNumber)) | 1762 | if (m_animations.Add(animID, m_controllingClient.NextAnimationSequenceNumber, objectID)) |
1763 | { | 1763 | { |
1764 | SendAnimPack(); | 1764 | SendAnimPack(); |
1765 | } | 1765 | } |
1766 | } | 1766 | } |
1767 | 1767 | ||
1768 | public void AddAnimation(string name) | 1768 | public void AddAnimation(string name, UUID objectID) |
1769 | { | 1769 | { |
1770 | if (m_isChildAgent) | 1770 | if (m_isChildAgent) |
1771 | return; | 1771 | return; |
@@ -1774,7 +1774,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1774 | if (animID == UUID.Zero) | 1774 | if (animID == UUID.Zero) |
1775 | return; | 1775 | return; |
1776 | 1776 | ||
1777 | AddAnimation(animID); | 1777 | AddAnimation(animID, objectID); |
1778 | } | 1778 | } |
1779 | 1779 | ||
1780 | public void RemoveAnimation(UUID animID) | 1780 | public void RemoveAnimation(UUID animID) |
@@ -1804,13 +1804,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1804 | { | 1804 | { |
1805 | UUID[] animIDs; | 1805 | UUID[] animIDs; |
1806 | int[] sequenceNums; | 1806 | int[] sequenceNums; |
1807 | m_animations.GetArrays( out animIDs, out sequenceNums ); | 1807 | UUID[] objectIDs; |
1808 | m_animations.GetArrays( out animIDs, out sequenceNums, out objectIDs); | ||
1808 | return animIDs; | 1809 | return animIDs; |
1809 | } | 1810 | } |
1810 | 1811 | ||
1811 | public void HandleStartAnim(IClientAPI remoteClient, UUID animID) | 1812 | public void HandleStartAnim(IClientAPI remoteClient, UUID animID) |
1812 | { | 1813 | { |
1813 | AddAnimation(animID); | 1814 | AddAnimation(animID, UUID.Zero); |
1814 | } | 1815 | } |
1815 | 1816 | ||
1816 | public void HandleStopAnim(IClientAPI remoteClient, UUID animID) | 1817 | public void HandleStopAnim(IClientAPI remoteClient, UUID animID) |
@@ -1826,7 +1827,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1826 | { | 1827 | { |
1827 | //m_log.DebugFormat("Updating movement animation to {0}", anim); | 1828 | //m_log.DebugFormat("Updating movement animation to {0}", anim); |
1828 | 1829 | ||
1829 | if (m_animations.TrySetDefaultAnimation(anim, m_controllingClient.NextAnimationSequenceNumber)) | 1830 | if (m_animations.TrySetDefaultAnimation(anim, m_controllingClient.NextAnimationSequenceNumber, UUID.Zero)) |
1830 | { | 1831 | { |
1831 | SendAnimPack(); | 1832 | SendAnimPack(); |
1832 | } | 1833 | } |
@@ -2284,13 +2285,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2284 | /// </summary> | 2285 | /// </summary> |
2285 | /// <param name="animations"></param> | 2286 | /// <param name="animations"></param> |
2286 | /// <param name="seqs"></param> | 2287 | /// <param name="seqs"></param> |
2287 | public void SendAnimPack(UUID[] animations, int[] seqs) | 2288 | public void SendAnimPack(UUID[] animations, int[] seqs, UUID[] objectIDs) |
2288 | { | 2289 | { |
2289 | if (m_isChildAgent) | 2290 | if (m_isChildAgent) |
2290 | return; | 2291 | return; |
2291 | 2292 | ||
2292 | m_scene.Broadcast( | 2293 | m_scene.Broadcast( |
2293 | delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId); }); | 2294 | delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId, objectIDs); }); |
2294 | } | 2295 | } |
2295 | 2296 | ||
2296 | public void SendAnimPackToClient(IClientAPI client) | 2297 | public void SendAnimPackToClient(IClientAPI client) |
@@ -2299,10 +2300,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2299 | return; | 2300 | return; |
2300 | UUID[] animIDs; | 2301 | UUID[] animIDs; |
2301 | int[] sequenceNums; | 2302 | int[] sequenceNums; |
2303 | UUID[] objectIDs; | ||
2302 | 2304 | ||
2303 | m_animations.GetArrays(out animIDs, out sequenceNums); | 2305 | m_animations.GetArrays(out animIDs, out sequenceNums, out objectIDs); |
2304 | 2306 | ||
2305 | client.SendAnimations(animIDs, sequenceNums, m_controllingClient.AgentId); | 2307 | client.SendAnimations(animIDs, sequenceNums, m_controllingClient.AgentId, objectIDs); |
2306 | } | 2308 | } |
2307 | 2309 | ||
2308 | /// <summary> | 2310 | /// <summary> |
@@ -2317,10 +2319,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2317 | 2319 | ||
2318 | UUID[] animIDs; | 2320 | UUID[] animIDs; |
2319 | int[] sequenceNums; | 2321 | int[] sequenceNums; |
2322 | UUID[] objectIDs; | ||
2320 | 2323 | ||
2321 | m_animations.GetArrays(out animIDs, out sequenceNums); | 2324 | m_animations.GetArrays(out animIDs, out sequenceNums, out objectIDs); |
2322 | 2325 | ||
2323 | SendAnimPack(animIDs, sequenceNums); | 2326 | SendAnimPack(animIDs, sequenceNums, objectIDs); |
2324 | } | 2327 | } |
2325 | 2328 | ||
2326 | #endregion | 2329 | #endregion |