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 17b32b764a
master-beforevarregion
parent
2f94165dcc
commit
0155d42b80
|
@ -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;
|
||||
|
||||
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;
|
||||
|
||||
if (!data.IsSatOnObject)
|
||||
{
|
||||
rot.X = 0;
|
||||
rot.Y = 0;
|
||||
}
|
||||
|
||||
rot.ToBytes(objectData, 52);
|
||||
//data.AngularVelocity.ToBytes(objectData, 64);
|
||||
|
||||
|
|
|
@ -1640,6 +1640,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
ControllingClient.SendAgentTerseUpdate(this);
|
||||
|
||||
PhysicsActor actor = PhysicsActor;
|
||||
|
||||
// This will be the case if the agent is sitting on the groudn or on an object.
|
||||
if (actor == null)
|
||||
{
|
||||
SendControlsToScripts(flagsForScripts);
|
||||
|
|
Loading…
Reference in New Issue