From e7aceae3e0e21b9f739dbcaac055c18991887e50 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 17 Jun 2012 09:06:25 +0100 Subject: split ugly expression in a if making it simpler to read --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 389a82b..d9867a8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2343,10 +2343,12 @@ 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 { - SetRot(m_host, rootPart.RotationOffset * Rot2Quaternion(rot)); + rootPart = m_host.ParentGroup.RootPart; + if (rootPart != null) + SetRot(m_host, rootPart.RotationOffset * Rot2Quaternion(rot)); } } -- cgit v1.1