diff options
author | UbitUmarov | 2012-02-23 14:50:49 +0000 |
---|---|---|
committer | UbitUmarov | 2012-02-23 14:50:49 +0000 |
commit | 8994ab13368674976e67e3024969ab7cdab30000 (patch) | |
tree | 18a58c29a7a7c76bce0b5d586dfb3947193df95a | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
parent | Show avatars as sitting on proot prims only to avoid motion jitter (diff) | |
download | opensim-SC-8994ab13368674976e67e3024969ab7cdab30000.zip opensim-SC-8994ab13368674976e67e3024969ab7cdab30000.tar.gz opensim-SC-8994ab13368674976e67e3024969ab7cdab30000.tar.bz2 opensim-SC-8994ab13368674976e67e3024969ab7cdab30000.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 161feda..1ac3b76 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -4828,9 +4828,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4828 | { | 4828 | { |
4829 | ScenePresence presence = (ScenePresence)entity; | 4829 | ScenePresence presence = (ScenePresence)entity; |
4830 | 4830 | ||
4831 | position = presence.OffsetPosition; | ||
4832 | rotation = presence.Rotation; | ||
4833 | |||
4834 | if (presence.ParentID != 0) | ||
4835 | { | ||
4836 | SceneObjectPart part = m_scene.GetSceneObjectPart(presence.ParentID); | ||
4837 | if (part != null && part != part.ParentGroup.RootPart) | ||
4838 | { | ||
4839 | position = part.OffsetPosition + presence.OffsetPosition * part.RotationOffset; | ||
4840 | rotation = presence.Rotation * part.RotationOffset; | ||
4841 | } | ||
4842 | } | ||
4843 | |||
4831 | attachPoint = 0; | 4844 | attachPoint = 0; |
4832 | collisionPlane = presence.CollisionPlane; | 4845 | collisionPlane = presence.CollisionPlane; |
4833 | position = presence.OffsetPosition; | ||
4834 | velocity = presence.Velocity; | 4846 | velocity = presence.Velocity; |
4835 | acceleration = Vector3.Zero; | 4847 | acceleration = Vector3.Zero; |
4836 | 4848 | ||
@@ -4840,7 +4852,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4840 | // acceleration = new Vector3(1, 0, 0); | 4852 | // acceleration = new Vector3(1, 0, 0); |
4841 | 4853 | ||
4842 | angularVelocity = Vector3.Zero; | 4854 | angularVelocity = Vector3.Zero; |
4843 | rotation = presence.Rotation; | ||
4844 | 4855 | ||
4845 | if (sendTexture) | 4856 | if (sendTexture) |
4846 | textureEntry = presence.Appearance.Texture.GetBytes(); | 4857 | textureEntry = presence.Appearance.Texture.GetBytes(); |
@@ -4945,13 +4956,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4945 | 4956 | ||
4946 | protected ObjectUpdatePacket.ObjectDataBlock CreateAvatarUpdateBlock(ScenePresence data) | 4957 | protected ObjectUpdatePacket.ObjectDataBlock CreateAvatarUpdateBlock(ScenePresence data) |
4947 | { | 4958 | { |
4959 | Vector3 offsetPosition = data.OffsetPosition; | ||
4960 | Quaternion rotation = data.Rotation; | ||
4961 | uint parentID = data.ParentID; | ||
4962 | |||
4963 | if (parentID != 0) | ||
4964 | { | ||
4965 | SceneObjectPart part = m_scene.GetSceneObjectPart(parentID); | ||
4966 | if (part != null && part != part.ParentGroup.RootPart) | ||
4967 | { | ||
4968 | offsetPosition = part.OffsetPosition + data.OffsetPosition * part.RotationOffset; | ||
4969 | rotation = data.Rotation * part.RotationOffset; | ||
4970 | parentID = part.ParentGroup.RootPart.LocalId; | ||
4971 | } | ||
4972 | } | ||
4973 | |||
4948 | byte[] objectData = new byte[76]; | 4974 | byte[] objectData = new byte[76]; |
4949 | 4975 | ||
4950 | data.CollisionPlane.ToBytes(objectData, 0); | 4976 | data.CollisionPlane.ToBytes(objectData, 0); |
4951 | data.OffsetPosition.ToBytes(objectData, 16); | 4977 | offsetPosition.ToBytes(objectData, 16); |
4952 | // data.Velocity.ToBytes(objectData, 28); | 4978 | // data.Velocity.ToBytes(objectData, 28); |
4953 | // data.Acceleration.ToBytes(objectData, 40); | 4979 | // data.Acceleration.ToBytes(objectData, 40); |
4954 | data.Rotation.ToBytes(objectData, 52); | 4980 | rotation.ToBytes(objectData, 52); |
4955 | //data.AngularVelocity.ToBytes(objectData, 64); | 4981 | //data.AngularVelocity.ToBytes(objectData, 64); |
4956 | 4982 | ||
4957 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); | 4983 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); |
@@ -4965,7 +4991,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4965 | update.NameValue = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " + | 4991 | update.NameValue = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " + |
4966 | data.Lastname + "\nTitle STRING RW SV " + data.Grouptitle); | 4992 | data.Lastname + "\nTitle STRING RW SV " + data.Grouptitle); |
4967 | update.ObjectData = objectData; | 4993 | update.ObjectData = objectData; |
4968 | update.ParentID = data.ParentID; | 4994 | update.ParentID = parentID; |
4969 | update.PathCurve = 16; | 4995 | update.PathCurve = 16; |
4970 | update.PathScaleX = 100; | 4996 | update.PathScaleX = 100; |
4971 | update.PathScaleY = 100; | 4997 | update.PathScaleY = 100; |