diff options
author | Justin Clark-Casey (justincc) | 2014-05-23 01:55:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-05-23 01:55:05 +0100 |
commit | 5015b0b485058db5bf1f2b56cf375c23349749ad (patch) | |
tree | 6f7ffa1109e63444d4c742e580d6976674122df2 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Add any camera at compensation for sat upon child prims to any existing camer... (diff) | |
download | opensim-SC_OLD-5015b0b485058db5bf1f2b56cf375c23349749ad.zip opensim-SC_OLD-5015b0b485058db5bf1f2b56cf375c23349749ad.tar.gz opensim-SC_OLD-5015b0b485058db5bf1f2b56cf375c23349749ad.tar.bz2 opensim-SC_OLD-5015b0b485058db5bf1f2b56cf375c23349749ad.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 |
1 files changed, 7 insertions, 3 deletions
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 | |||
2755 | 2755 | ||
2756 | cameraAtOffset = part.GetCameraAtOffset(); | 2756 | cameraAtOffset = part.GetCameraAtOffset(); |
2757 | 2757 | ||
2758 | if (cameraAtOffset == Vector3.Zero) | 2758 | if (!part.IsRoot && cameraAtOffset == Vector3.Zero) |
2759 | cameraAtOffset = part.ParentGroup.RootPart.GetCameraAtOffset(); | 2759 | cameraAtOffset = part.ParentGroup.RootPart.GetCameraAtOffset(); |
2760 | 2760 | ||
2761 | bool cameraEyeOffsetFromRootForChild = false; | ||
2761 | cameraEyeOffset = part.GetCameraEyeOffset(); | 2762 | cameraEyeOffset = part.GetCameraEyeOffset(); |
2762 | 2763 | ||
2763 | if (cameraEyeOffset == Vector3.Zero) | 2764 | if (!part.IsRoot && cameraEyeOffset == Vector3.Zero) |
2765 | { | ||
2764 | cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset(); | 2766 | cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset(); |
2767 | cameraEyeOffsetFromRootForChild = true; | ||
2768 | } | ||
2765 | 2769 | ||
2766 | if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero) | 2770 | if ((cameraEyeOffset != Vector3.Zero && !cameraEyeOffsetFromRootForChild) || cameraAtOffset != Vector3.Zero) |
2767 | { | 2771 | { |
2768 | if (!part.IsRoot) | 2772 | if (!part.IsRoot) |
2769 | { | 2773 | { |