From 1b156b7fe84bf132b51ff198d6d730708f5930b7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 May 2014 19:18:24 +0100 Subject: Add regression test for in-range chat between neighbouring regions from east to west. --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3b8fbfd..7005c0a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4133,7 +4133,10 @@ namespace OpenSim.Region.Framework.Scenes /// true if we handled it. public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData) { - //m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName); +// m_log.DebugFormat( +// "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}", +// cAgentData.AgentID, Name, cAgentData.Position); + ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); if (childAgentUpdate != null) { -- cgit v1.1 From 16bf38e1abd3a6235008a38ba7ca29e836c925c7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 May 2014 23:39:22 +0100 Subject: Fix issue where llSetCameraAtOffset() and llSetCameraEyeOffset() in non-root prims moved camera/focus to wrong position. For non-root prim, eye offsets now need to be made relative to root prim if either camera-at or camera-eye are set. Probably a regression since November 2013 when all sits were made relative to root prim to match viewer expections (and fix other bugs). Addresses http://opensimulator.org/mantis/view.php?id=7176 --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 398d394..ed107e4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2755,6 +2755,10 @@ namespace OpenSim.Region.Framework.Scenes cameraAtOffset = part.GetCameraAtOffset(); cameraEyeOffset = part.GetCameraEyeOffset(); + + if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero) + cameraEyeOffset += part.OffsetPosition; + forceMouselook = part.GetForceMouselook(); // An viewer expects to specify sit positions as offsets to the root prim, even if a child prim is -- cgit v1.1 From 3fbaef9275dbb1767dc734e2d8dbe1d2cabfb566 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 May 2014 23:52:28 +0100 Subject: If the root prim has a camera-at or camera-eye setting and a sat upon child prim does not, use the root prim offsets. This matches behaviour just tested on the Linden Lab grid. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ed107e4..026b0b6 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2754,8 +2754,15 @@ namespace OpenSim.Region.Framework.Scenes part.AddSittingAvatar(this); cameraAtOffset = part.GetCameraAtOffset(); + + if (cameraAtOffset == Vector3.Zero) + cameraAtOffset = part.ParentGroup.RootPart.GetCameraAtOffset(); + cameraEyeOffset = part.GetCameraEyeOffset(); + if (cameraEyeOffset == Vector3.Zero) + cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset(); + if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero) cameraEyeOffset += part.OffsetPosition; -- cgit v1.1 From fbed2455965283e7cec92f8cceb89a333e1dca14 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 May 2014 01:34:02 +0100 Subject: Compensate camera-at and camera-eye for child prim rotation when sitting on child prim with camera-eye set --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 026b0b6..eaac71d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2764,7 +2764,19 @@ namespace OpenSim.Region.Framework.Scenes cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset(); if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero) + { + if (!part.IsRoot) + { + cameraEyeOffset = cameraEyeOffset * part.RotationOffset; + cameraAtOffset = part.OffsetPosition; + } + cameraEyeOffset += part.OffsetPosition; + } + +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Using cameraAtOffset {0}, cameraEyeOffset {1} for sit on {2} by {3} in {4}", +// cameraAtOffset, cameraEyeOffset, part.Name, Name, Scene.Name); forceMouselook = part.GetForceMouselook(); -- cgit v1.1 From c78a8271c44c581e4c939fa6347fd967ffdee847 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 May 2014 01:38:05 +0100 Subject: Add any camera at compensation for sat upon child prims to any existing camera-at value, rather than replace. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index eaac71d..f067f9d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2768,7 +2768,7 @@ namespace OpenSim.Region.Framework.Scenes if (!part.IsRoot) { cameraEyeOffset = cameraEyeOffset * part.RotationOffset; - cameraAtOffset = part.OffsetPosition; + cameraAtOffset += part.OffsetPosition; } cameraEyeOffset += part.OffsetPosition; -- cgit v1.1 From 5015b0b485058db5bf1f2b56cf375c23349749ad Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 May 2014 01:55:05 +0100 Subject: If one is sitting on a child with an unset camera-eye and so using one set in a root prim, the focus should remain on the root prim. Matches behaviour just tested on the Linden grid. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f067f9d..17f54c2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2755,15 +2755,19 @@ namespace OpenSim.Region.Framework.Scenes cameraAtOffset = part.GetCameraAtOffset(); - if (cameraAtOffset == Vector3.Zero) + if (!part.IsRoot && cameraAtOffset == Vector3.Zero) cameraAtOffset = part.ParentGroup.RootPart.GetCameraAtOffset(); + bool cameraEyeOffsetFromRootForChild = false; cameraEyeOffset = part.GetCameraEyeOffset(); - if (cameraEyeOffset == Vector3.Zero) + if (!part.IsRoot && cameraEyeOffset == Vector3.Zero) + { cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset(); + cameraEyeOffsetFromRootForChild = true; + } - if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero) + if ((cameraEyeOffset != Vector3.Zero && !cameraEyeOffsetFromRootForChild) || cameraAtOffset != Vector3.Zero) { if (!part.IsRoot) { -- cgit v1.1