Patch Applied regarding Bug #51

brokenplugins
jmalthus 2007-02-14 02:36:25 +00:00
parent 2538e747ac
commit 726b91d74d
2 changed files with 32 additions and 0 deletions

View File

@ -195,6 +195,28 @@ namespace OpenSim
ani.AnimationList[0].AnimSequenceID = AgentList[userInfo.AgentID].AnimSequenceID; ani.AnimationList[0].AnimSequenceID = AgentList[userInfo.AgentID].AnimSequenceID;
Console.WriteLine("Agenct_Manager.cs: UpdateAnim(UserAgentInfo userInfo): Sent Animation to client - " + AgentManager.AnimsNames[ani.AnimationList[0].AnimID]); Console.WriteLine("Agenct_Manager.cs: UpdateAnim(UserAgentInfo userInfo): Sent Animation to client - " + AgentManager.AnimsNames[ani.AnimationList[0].AnimID]);
_server.SendPacket(ani, true, userInfo); _server.SendPacket(ani, true, userInfo);
// update other agents as appropiate
Axiom.MathLib.Sphere BoundingSphere;
foreach (KeyValuePair<libsecondlife.LLUUID, AvatarData> kp in this.AgentList)
{
if(kp.Key!=userInfo.AgentID) {
// Make a bounding sphere for the other avatar
BoundingSphere = new Sphere(new Vector3(kp.Value.Position.X,kp.Value.Position.Y,kp.Value.Position.Z), kp.Value.far);
// If it intersects with our position, send an update packet
if(BoundingSphere.Intersects(new Vector3(this.AgentList[userInfo.AgentID].Position.X,this.AgentList[userInfo.AgentID].Position.Y,this.AgentList[userInfo.AgentID].Position.Z))) {
ani.AnimationSourceList[0].ObjectID = userInfo.AgentID;
ani.Sender = new AvatarAnimationPacket.SenderBlock();
ani.Sender.ID = userInfo.AgentID;
ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1];
ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock();
ani.AnimationList[0].AnimID = AgentList[userInfo.AgentID].AnimID;
ani.AnimationList[0].AnimSequenceID = AgentList[userInfo.AgentID].AnimSequenceID;
_server.SendPacket(ani, true, kp.Value.NetInfo);
}
}
}
} }
/// <summary> /// <summary>
/// ///
@ -816,6 +838,11 @@ namespace OpenSim
public LLUUID BaseFolder; public LLUUID BaseFolder;
public LLUUID AnimID; public LLUUID AnimID;
public int AnimSequenceID; public int AnimSequenceID;
public float far;
public libsecondlife.LLVector3 CameraAtAxis;
public libsecondlife.LLVector3 CameraCenter;
public libsecondlife.LLVector3 CameraLeftAxis;
public libsecondlife.LLVector3 CameraUpAxis;
public AvatarData() public AvatarData()
{ {

View File

@ -232,6 +232,11 @@ namespace OpenSim
AgentUpdatePacket agent = (AgentUpdatePacket)pack; AgentUpdatePacket agent = (AgentUpdatePacket)pack;
uint mask = agent.AgentData.ControlFlags & (1); uint mask = agent.AgentData.ControlFlags & (1);
AvatarData avatar = _agentManager.GetAgent(userInfo.AgentID); AvatarData avatar = _agentManager.GetAgent(userInfo.AgentID);
avatar.CameraAtAxis = agent.AgentData.CameraAtAxis;
avatar.CameraUpAxis = agent.AgentData.CameraUpAxis;
avatar.CameraCenter = agent.AgentData.CameraCenter;
avatar.far = agent.AgentData.Far;
if (avatar != null) if (avatar != null)
{ {
if (avatar.Started) if (avatar.Started)