aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Controller.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Controller.cs')
-rw-r--r--Controller.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/Controller.cs b/Controller.cs
index 73d516e..1c3b891 100644
--- a/Controller.cs
+++ b/Controller.cs
@@ -107,10 +107,14 @@ namespace OpenSim
107 else if (pack.Type == PacketType.AgentAnimation) 107 else if (pack.Type == PacketType.AgentAnimation)
108 { 108 {
109 AgentAnimationPacket AgentAni = (AgentAnimationPacket)pack; 109 AgentAnimationPacket AgentAni = (AgentAnimationPacket)pack;
110 if (AgentAni.AgentData.AgentID == userInfo.AgentID) 110 for (int i = 0; i < AgentAni.AnimationList.Length; i++)
111 { 111 {
112 _agentManager.UpdateAnim(userInfo, AgentAni.AnimationList[0].AnimID, 1); 112 if (AgentAni.AnimationList[i].StartAnim)
113 {
114 _agentManager.UpdateAnim(userInfo, AgentAni.AnimationList[0].AnimID, 1);
115 }
113 } 116 }
117
114 } 118 }
115 else if (pack.Type == PacketType.FetchInventory) 119 else if (pack.Type == PacketType.FetchInventory)
116 { 120 {
@@ -238,7 +242,7 @@ namespace OpenSim
238 { 242 {
239 //start walking 243 //start walking
240 _agentManager.SendMoveCommand(userInfo, false, avatar.Position.X, avatar.Position.Y, avatar.Position.Z, 0, agent.AgentData.BodyRotation); 244 _agentManager.SendMoveCommand(userInfo, false, avatar.Position.X, avatar.Position.Y, avatar.Position.Z, 0, agent.AgentData.BodyRotation);
241 _agentManager.UpdateAnim(avatar.NetInfo, Globals.Instance.ANIM_AGENT_WALK, 1); 245 _agentManager.UpdateAnim(avatar.NetInfo, AgentManager.AnimsLLUUID["ANIM_AGENT_WALK"], 1);
242 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(1, 0, 0); 246 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(1, 0, 0);
243 Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(agent.AgentData.BodyRotation.W, agent.AgentData.BodyRotation.X, agent.AgentData.BodyRotation.Y, agent.AgentData.BodyRotation.Z); 247 Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(agent.AgentData.BodyRotation.W, agent.AgentData.BodyRotation.X, agent.AgentData.BodyRotation.Y, agent.AgentData.BodyRotation.Z);
244 Axiom.MathLib.Vector3 direc = q * v3; 248 Axiom.MathLib.Vector3 direc = q * v3;
@@ -257,7 +261,7 @@ namespace OpenSim
257 { 261 {
258 //walking but key not pressed so need to stop 262 //walking but key not pressed so need to stop
259 _agentManager.SendMoveCommand(userInfo, true, avatar.Position.X, avatar.Position.Y, avatar.Position.Z, 0, agent.AgentData.BodyRotation); 263 _agentManager.SendMoveCommand(userInfo, true, avatar.Position.X, avatar.Position.Y, avatar.Position.Z, 0, agent.AgentData.BodyRotation);
260 _agentManager.UpdateAnim(avatar.NetInfo, Globals.Instance.ANIM_AGENT_STAND, 1); 264 _agentManager.UpdateAnim(avatar.NetInfo, AgentManager.AnimsLLUUID["ANIM_AGENT_STAND"], 1);
261 avatar.Walk = false; 265 avatar.Walk = false;
262 avatar.Velocity.X = 0; 266 avatar.Velocity.X = 0;
263 avatar.Velocity.Y = 0; 267 avatar.Velocity.Y = 0;