From 0785210e29c75b09084321dca0569c9e4b73f858 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 27 Nov 2013 02:08:22 +0000 Subject: Fix stand positions rather than having the stand jump to the root prim. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 1ac9d7f..c1aae3f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5076,6 +5076,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP { ScenePresence presence = (ScenePresence)entity; +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Sending terse update to {0} with position {1} in {2}", Name, presence.OffsetPosition, m_scene.Name); + attachPoint = presence.State; collisionPlane = presence.CollisionPlane; position = presence.OffsetPosition; @@ -5195,6 +5198,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected ObjectUpdatePacket.ObjectDataBlock CreateAvatarUpdateBlock(ScenePresence data) { +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Sending full update to {0} with position {1} in {2}", Name, data.OffsetPosition, m_scene.Name); + byte[] objectData = new byte[76]; data.CollisionPlane.ToBytes(objectData, 0); @@ -12646,6 +12652,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (p is ScenePresence) { +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Immediately sending terse agent update for {0} to {1} in {2}", +// p.Name, Name, Scene.Name); + // It turns out to get the agent to stop flying, you have to feed it stop flying velocities // There's no explicit message to send the client to tell it to stop flying.. it relies on the // velocity, collision plane and avatar height -- cgit v1.1 From 8b3a4367ea8d7a0a8b6fbbf261b61f28b5cbab51 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Nov 2013 02:51:35 +0000 Subject: Still send CameraEyeOffset in UDP SendSitReponse even if at offset is Vector3.Zero --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8592650..c1aae3f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -2635,11 +2635,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); avatarSitResponse.SitObject.ID = TargetID; - if (CameraAtOffset != Vector3.Zero) - { - avatarSitResponse.SitTransform.CameraAtOffset = CameraAtOffset; - avatarSitResponse.SitTransform.CameraEyeOffset = CameraEyeOffset; - } + avatarSitResponse.SitTransform.CameraAtOffset = CameraAtOffset; + avatarSitResponse.SitTransform.CameraEyeOffset = CameraEyeOffset; avatarSitResponse.SitTransform.ForceMouselook = ForceMouseLook; avatarSitResponse.SitTransform.AutoPilot = autopilot; avatarSitResponse.SitTransform.SitPosition = OffsetPos; -- cgit v1.1 From 17b32b764acd815400d9eb903aaec6dcebd60ac7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 5 Dec 2013 02:10:46 +0000 Subject: Fix regression where mouse look flight direction no longer worked by zeroing x/y rot before sending agent updates, instead of before any agent update processing It turns out that the x/y rot data in mouselook is needed to implement this and to push the avatar against the ground if walking in mouselook. Doing this in the terse send so that we preserve mouselook rotation information --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index c1aae3f..a04ded5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5091,7 +5091,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP // acceleration = new Vector3(1, 0, 0); angularVelocity = presence.AngularVelocity; + + // Whilst not in mouselook, an avatar will transmit only the Z rotation as this is the only axis + // it rotates around. + // In mouselook, X and Y co-ordinate will also be sent but when used in Rotation, these cause unwanted + // 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. rotation = presence.Rotation; + rotation.X = 0; + rotation.Y = 0; if (sendTexture) textureEntry = presence.Appearance.Texture.GetBytes(); @@ -5207,7 +5218,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP data.OffsetPosition.ToBytes(objectData, 16); // data.Velocity.ToBytes(objectData, 28); // data.Acceleration.ToBytes(objectData, 40); - data.Rotation.ToBytes(objectData, 52); + + // Whilst not in mouselook, an avatar will transmit only the Z rotation as this is the only axis + // it rotates around. + // In mouselook, X and Y co-ordinate will also be sent but when used in Rotation, these cause unwanted + // 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. + Quaternion rot = data.Rotation; + rot.X = 0; + rot.Y = 0; + rot.ToBytes(objectData, 52); //data.AngularVelocity.ToBytes(objectData, 64); ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); -- cgit v1.1 From 16aaba77d49baad0dc581ffbf69d71181b9be70f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 6 Dec 2013 00:30:44 +0000 Subject: Properly set InventoryType.Snapshot when a snapshot is uploaded Resolves http://opensimulator.org/mantis/view.php?id=6857 This prevents the inventory service complaining later about an attempt to change an invariant --- OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 1d4c7f0..66d2138 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -501,6 +501,10 @@ namespace OpenSim.Region.ClientStack.Linden inType = 1; assType = 1; } + else if (inventoryType == "snapshot") + { + inType = (sbyte)InventoryType.Snapshot; + } else if (inventoryType == "animation") { inType = 19; -- cgit v1.1 From bb4f4d9480df4c17ea31288c069993305c7e1582 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 6 Dec 2013 00:38:18 +0000 Subject: minor: Use enums for setting inv/asset types on data upload rather than magic numbers --- .../ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 66d2138..a4fe81c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -498,8 +498,8 @@ namespace OpenSim.Region.ClientStack.Linden if (inventoryType == "sound") { - inType = 1; - assType = 1; + inType = (sbyte)InventoryType.Sound; + assType = (sbyte)AssetType.Sound; } else if (inventoryType == "snapshot") { @@ -507,19 +507,19 @@ namespace OpenSim.Region.ClientStack.Linden } else if (inventoryType == "animation") { - inType = 19; - assType = 20; + inType = (sbyte)InventoryType.Animation; + assType = (sbyte)AssetType.Animation; } else if (inventoryType == "wearable") { - inType = 18; + inType = (sbyte)InventoryType.Wearable; switch (assetType) { case "bodypart": - assType = 13; + assType = (sbyte)AssetType.Bodypart; break; case "clothing": - assType = 5; + assType = (sbyte)AssetType.Clothing; break; } } -- cgit v1.1