aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2012-05-12 15:27:37 +0100
committerUbitUmarov2012-05-12 15:27:37 +0100
commit7461fe4554f8104212071e3e01b07786f8eb546f (patch)
treea2615f5f2ee712baae0a2d3ec3c8f0e5e851f39d /OpenSim/Region/Framework/Scenes
parentMerge branch 'avination' into ubitwork (diff)
downloadopensim-SC-7461fe4554f8104212071e3e01b07786f8eb546f.zip
opensim-SC-7461fe4554f8104212071e3e01b07786f8eb546f.tar.gz
opensim-SC-7461fe4554f8104212071e3e01b07786f8eb546f.tar.bz2
opensim-SC-7461fe4554f8104212071e3e01b07786f8eb546f.tar.xz
ªTEST MESS* reduce animation packets send. Added onchangeanim event with parameters to define if to add or remove, and if to send anims pack on that evocation, etc
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs8
2 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index f5623bd..e577958 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -79,13 +79,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation
79 m_scenePresence = sp; 79 m_scenePresence = sp;
80 CurrentMovementAnimation = "CROUCH"; 80 CurrentMovementAnimation = "CROUCH";
81 } 81 }
82 82
83 public void AddAnimation(UUID animID, UUID objectID) 83 public void AddAnimation(UUID animID, UUID objectID)
84 { 84 {
85 if (m_scenePresence.IsChildAgent) 85 if (m_scenePresence.IsChildAgent)
86 return; 86 return;
87 87
88// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name); 88 // m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name);
89 89
90 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) 90 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
91 SendAnimPack(); 91 SendAnimPack();
@@ -117,6 +117,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation
117 SendAnimPack(); 117 SendAnimPack();
118 } 118 }
119 119
120 public void avnChangeAnim(UUID animID, bool addRemove, bool sendPack)
121 {
122 if (m_scenePresence.IsChildAgent)
123 return;
124
125 if (animID != UUID.Zero)
126 {
127 if (addRemove)
128 m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, UUID.Zero);
129 else
130 m_animations.Remove(animID);
131 }
132 if(sendPack)
133 SendAnimPack();
134 }
135
120 // Called from scripts 136 // Called from scripts
121 public void RemoveAnimation(string name) 137 public void RemoveAnimation(string name)
122 { 138 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 212720e..ba0ed95 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -781,6 +781,7 @@ namespace OpenSim.Region.Framework.Scenes
781 ControllingClient.OnSetAlwaysRun += HandleSetAlwaysRun; 781 ControllingClient.OnSetAlwaysRun += HandleSetAlwaysRun;
782 ControllingClient.OnStartAnim += HandleStartAnim; 782 ControllingClient.OnStartAnim += HandleStartAnim;
783 ControllingClient.OnStopAnim += HandleStopAnim; 783 ControllingClient.OnStopAnim += HandleStopAnim;
784 ControllingClient.OnChangeAnim += avnHandleChangeAnim;
784 ControllingClient.OnForceReleaseControls += HandleForceReleaseControls; 785 ControllingClient.OnForceReleaseControls += HandleForceReleaseControls;
785 ControllingClient.OnAutoPilotGo += MoveToTarget; 786 ControllingClient.OnAutoPilotGo += MoveToTarget;
786 787
@@ -2432,6 +2433,13 @@ namespace OpenSim.Region.Framework.Scenes
2432 Animator.RemoveAnimation(animID); 2433 Animator.RemoveAnimation(animID);
2433 } 2434 }
2434 2435
2436 public void avnHandleChangeAnim(UUID animID, bool addRemove,bool sendPack)
2437 {
2438 Animator.avnChangeAnim(animID, addRemove, sendPack);
2439 }
2440
2441
2442
2435 /// <summary> 2443 /// <summary>
2436 /// Rotate the avatar to the given rotation and apply a movement in the given relative vector 2444 /// Rotate the avatar to the given rotation and apply a movement in the given relative vector
2437 /// </summary> 2445 /// </summary>