aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Agent_Manager.cs27
-rw-r--r--Controller.cs5
2 files changed, 32 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 {
diff --git a/Controller.cs b/Controller.cs
index 1c3b891..d0a17cf 100644
--- a/Controller.cs
+++ b/Controller.cs
@@ -232,6 +232,11 @@ namespace OpenSim
232 AgentUpdatePacket agent = (AgentUpdatePacket)pack; 232 AgentUpdatePacket agent = (AgentUpdatePacket)pack;
233 uint mask = agent.AgentData.ControlFlags & (1); 233 uint mask = agent.AgentData.ControlFlags & (1);
234 AvatarData avatar = _agentManager.GetAgent(userInfo.AgentID); 234 AvatarData avatar = _agentManager.GetAgent(userInfo.AgentID);
235 avatar.CameraAtAxis = agent.AgentData.CameraAtAxis;
236 avatar.CameraUpAxis = agent.AgentData.CameraUpAxis;
237 avatar.CameraCenter = agent.AgentData.CameraCenter;
238 avatar.far = agent.AgentData.Far;
239
235 if (avatar != null) 240 if (avatar != null)
236 { 241 {
237 if (avatar.Started) 242 if (avatar.Started)