aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Agent_Manager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Agent_Manager.cs')
-rw-r--r--Agent_Manager.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Agent_Manager.cs b/Agent_Manager.cs
index a143bda..11b523e 100644
--- a/Agent_Manager.cs
+++ b/Agent_Manager.cs
@@ -195,6 +195,28 @@ namespace OpenSim
195 ani.AnimationList[0].AnimSequenceID = AgentList[userInfo.AgentID].AnimSequenceID; 195 ani.AnimationList[0].AnimSequenceID = AgentList[userInfo.AgentID].AnimSequenceID;
196 Console.WriteLine("Agenct_Manager.cs: UpdateAnim(UserAgentInfo userInfo): Sent Animation to client - " + AgentManager.AnimsNames[ani.AnimationList[0].AnimID]); 196 Console.WriteLine("Agenct_Manager.cs: UpdateAnim(UserAgentInfo userInfo): Sent Animation to client - " + AgentManager.AnimsNames[ani.AnimationList[0].AnimID]);
197 _server.SendPacket(ani, true, userInfo); 197 _server.SendPacket(ani, true, userInfo);
198
199 // update other agents as appropiate
200 Axiom.MathLib.Sphere BoundingSphere;
201 foreach (KeyValuePair<libsecondlife.LLUUID, AvatarData> kp in this.AgentList)
202 {
203 if(kp.Key!=userInfo.AgentID) {
204 // Make a bounding sphere for the other avatar
205 BoundingSphere = new Sphere(new Vector3(kp.Value.Position.X,kp.Value.Position.Y,kp.Value.Position.Z), kp.Value.far);
206
207 // If it intersects with our position, send an update packet
208 if(BoundingSphere.Intersects(new Vector3(this.AgentList[userInfo.AgentID].Position.X,this.AgentList[userInfo.AgentID].Position.Y,this.AgentList[userInfo.AgentID].Position.Z))) {
209 ani.AnimationSourceList[0].ObjectID = userInfo.AgentID;
210 ani.Sender = new AvatarAnimationPacket.SenderBlock();
211 ani.Sender.ID = userInfo.AgentID;
212 ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1];
213 ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock();
214 ani.AnimationList[0].AnimID = AgentList[userInfo.AgentID].AnimID;
215 ani.AnimationList[0].AnimSequenceID = AgentList[userInfo.AgentID].AnimSequenceID;
216 _server.SendPacket(ani, true, kp.Value.NetInfo);
217 }
218 }
219 }
198 } 220 }
199 /// <summary> 221 /// <summary>
200 /// 222 ///
@@ -816,6 +838,11 @@ namespace OpenSim
816 public LLUUID BaseFolder; 838 public LLUUID BaseFolder;
817 public LLUUID AnimID; 839 public LLUUID AnimID;
818 public int AnimSequenceID; 840 public int AnimSequenceID;
841 public float far;
842 public libsecondlife.LLVector3 CameraAtAxis;
843 public libsecondlife.LLVector3 CameraCenter;
844 public libsecondlife.LLVector3 CameraLeftAxis;
845 public libsecondlife.LLVector3 CameraUpAxis;
819 846
820 public AvatarData() 847 public AvatarData()
821 { 848 {