From 0155d42b80ee7b35d0a882052d8cf4976e7d15de Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 8 Jan 2014 00:54:39 +0000 Subject: If an agent is sitting, then do send the rotation in the agent update instead of zeroing it to resolve mouselook camera problems Addresses http://opensimulator.org/mantis/view.php?id=6892 Thanks to tglion for this spot. This resolves a recent regression from 17b32b764acd815400d9eb903aaec6dcebd60ac7 --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index a04ded5..c38c829 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5098,11 +5098,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP // excessive up and down movements of the camera when looking up and down. // See http://opensimulator.org/mantis/view.php?id=3274 // This does not affect head movement, since this is controlled entirely by camera movement rather than - // body rotation. It does not affect sitting avatar since it's the sitting part rotation that takes - // effect, not the avatar rotation. + // body rotation. We still need to transmit X and Y for sitting avatars but mouselook does not change + // the rotation in this case. rotation = presence.Rotation; - rotation.X = 0; - rotation.Y = 0; + + if (!presence.IsSatOnObject) + { + rotation.X = 0; + rotation.Y = 0; + } if (sendTexture) textureEntry = presence.Appearance.Texture.GetBytes(); @@ -5225,11 +5229,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP // excessive up and down movements of the camera when looking up and down. // See http://opensimulator.org/mantis/view.php?id=3274 // This does not affect head movement, since this is controlled entirely by camera movement rather than - // body rotation. It does not affect sitting avatar since it's the sitting part rotation that takes - // effect, not the avatar rotation. + // body rotation. We still need to transmit X and Y for sitting avatars but mouselook does not change + // the rotation in this case. Quaternion rot = data.Rotation; - rot.X = 0; - rot.Y = 0; + + if (!data.IsSatOnObject) + { + rot.X = 0; + rot.Y = 0; + } + rot.ToBytes(objectData, 52); //data.AngularVelocity.ToBytes(objectData, 64); -- cgit v1.1