From 9b51bb545ecf07ad1b1b8188d62d4b4a03bc3fff Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 23 Jul 2008 11:07:59 +0000 Subject: Changed it so the avatar's rotation is now sent as part of a full avatar update. This should fix the wrong rotation on existing sitting avatar when logging in bug. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 41ac657..3fa26e4 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2132,7 +2132,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, - uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID) + uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID, LLQuaternion rotation) { ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); // TODO: don't create new blocks if recycling an old packet @@ -2147,9 +2147,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP objupdate.ObjectData[0].ParentID = parentID; objupdate.ObjectData[0].NameValue = Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName); + LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); byte[] pb = pos2.GetBytes(); Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); + + byte[] rot = rotation.GetBytes(); + Array.Copy(rot, 0, objupdate.ObjectData[0].ObjectData, 52, rot.Length); + objupdate.Header.Zerocoded = true; OutPacket(objupdate, ThrottleOutPacketType.Task); } -- cgit v1.1