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.bullet-2.82
parent
3fbaef9275
commit
174df94172
|
@ -6846,12 +6846,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
m_host.SetCameraEyeOffset(offset);
|
m_host.SetCameraEyeOffset(offset);
|
||||||
|
|
||||||
|
if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero)
|
||||||
|
m_host.ParentGroup.RootPart.SetCameraEyeOffset(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llSetCameraAtOffset(LSL_Vector offset)
|
public void llSetCameraAtOffset(LSL_Vector offset)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
m_host.SetCameraAtOffset(offset);
|
m_host.SetCameraAtOffset(offset);
|
||||||
|
|
||||||
|
if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero)
|
||||||
|
m_host.ParentGroup.RootPart.SetCameraAtOffset(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at)
|
public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at)
|
||||||
|
|
Loading…
Reference in New Issue