split ugly expression in a if making it simpler to read
parent
e2b9a5d7aa
commit
e7aceae3e0
|
@ -2343,9 +2343,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
else
|
||||
{
|
||||
// we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask.
|
||||
SceneObjectPart rootPart;// = m_host.ParentGroup.RootPart;
|
||||
if (m_host.ParentGroup != null && ((rootPart = m_host.ParentGroup.RootPart) != null)) // better safe than sorry
|
||||
SceneObjectPart rootPart;
|
||||
if (m_host.ParentGroup != null) // better safe than sorry
|
||||
{
|
||||
rootPart = m_host.ParentGroup.RootPart;
|
||||
if (rootPart != null)
|
||||
SetRot(m_host, rootPart.RotationOffset * Rot2Quaternion(rot));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue