Re-add the objectID field to the anim pack, that was deemed unneccessary

and dropped nonths ago, because it is required to get smooth region
crossings with AO running. Without it, in some corner cases, anims will
continue to run in an unstoppable state.
This commit is contained in:
Melanie Thielker
2009-02-17 04:16:42 +00:00
parent 2c272762f8
commit 3130784934
10 changed files with 49 additions and 33 deletions

View File

@@ -2493,15 +2493,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(avp, ThrottleOutPacketType.Task);
}
public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId)
public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
{
//m_log.DebugFormat("[CLIENT]: Sending animations to {0}", Name);
AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation);
// TODO: don't create new blocks if recycling an old packet
ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1];
ani.AnimationSourceList[0] = new AvatarAnimationPacket.AnimationSourceListBlock();
ani.AnimationSourceList[0].ObjectID = sourceAgentId;
ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[animations.Length];
ani.Sender = new AvatarAnimationPacket.SenderBlock();
ani.Sender.ID = sourceAgentId;
ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[animations.Length];
@@ -2511,6 +2509,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ani.AnimationList[i] = new AvatarAnimationPacket.AnimationListBlock();
ani.AnimationList[i].AnimID = animations[i];
ani.AnimationList[i].AnimSequenceID = seqs[i];
ani.AnimationSourceList[i] = new AvatarAnimationPacket.AnimationSourceListBlock();
ani.AnimationSourceList[i].ObjectID = objectIDs[i];
if (objectIDs[i] == UUID.Zero)
ani.AnimationSourceList[i].ObjectID = sourceAgentId;
}
ani.Header.Reliable = false;
OutPacket(ani, ThrottleOutPacketType.Task);