diff options
author | Justin Clark-Casey (justincc) | 2014-05-22 23:58:28 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-05-22 23:58:28 +0100 |
commit | 174df941720bc45c1e73224919c34f059129b9e1 (patch) | |
tree | 72ffc93c70579cf611c4078eb48591d9bc4d140b | |
parent | If the root prim has a camera-at or camera-eye setting and a sat upon child p... (diff) | |
download | opensim-SC_OLD-174df941720bc45c1e73224919c34f059129b9e1.zip opensim-SC_OLD-174df941720bc45c1e73224919c34f059129b9e1.tar.gz opensim-SC_OLD-174df941720bc45c1e73224919c34f059129b9e1.tar.bz2 opensim-SC_OLD-174df941720bc45c1e73224919c34f059129b9e1.tar.xz |
If a script calls llSetCameraAtOffset() or llSetCameraEyeOffset() on a child prim and the root prim has no corresponding value set, then also set the root prim.
This matches behaviour just tested on the Linden Lab grid.
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5590cd5..7d8821c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6846,12 +6846,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6846 | { | 6846 | { |
6847 | m_host.AddScriptLPS(1); | 6847 | m_host.AddScriptLPS(1); |
6848 | m_host.SetCameraEyeOffset(offset); | 6848 | m_host.SetCameraEyeOffset(offset); |
6849 | |||
6850 | if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) | ||
6851 | m_host.ParentGroup.RootPart.SetCameraEyeOffset(offset); | ||
6849 | } | 6852 | } |
6850 | 6853 | ||
6851 | public void llSetCameraAtOffset(LSL_Vector offset) | 6854 | public void llSetCameraAtOffset(LSL_Vector offset) |
6852 | { | 6855 | { |
6853 | m_host.AddScriptLPS(1); | 6856 | m_host.AddScriptLPS(1); |
6854 | m_host.SetCameraAtOffset(offset); | 6857 | m_host.SetCameraAtOffset(offset); |
6858 | |||
6859 | if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) | ||
6860 | m_host.ParentGroup.RootPart.SetCameraAtOffset(offset); | ||
6855 | } | 6861 | } |
6856 | 6862 | ||
6857 | public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) | 6863 | public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) |