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.
bullet-2.82
Justin Clark-Casey (justincc) 2014-05-23 01:55:05 +01:00
parent c78a8271c4
commit 5015b0b485
1 changed files with 7 additions and 3 deletions

View File

@ -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)
{