aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-01 02:09:41 +0100
committerJustin Clark-Casey (justincc)2011-09-01 02:11:00 +0100
commit7eca929686bd2db1cb42f5c9740fd1d186cdc8b1 (patch)
tree775f07f365acb56bc6043831d5832c2dac468ade /OpenSim/Region/ScriptEngine/Shared/Api
parentrefactor: use ParentGroup.UUID directly instead of SOP.GetRootPartUUID() (diff)
downloadopensim-SC_OLD-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.zip
opensim-SC_OLD-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.tar.gz
opensim-SC_OLD-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.tar.bz2
opensim-SC_OLD-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.tar.xz
Eliminate pointless checks of SOG.RootPart != null
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs7
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs3
2 files changed, 2 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8d95546..2fd98f6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2767,8 +2767,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2767 // If either of these are null, then there was an unknown error. 2767 // If either of these are null, then there was an unknown error.
2768 if (new_group == null) 2768 if (new_group == null)
2769 continue; 2769 continue;
2770 if (new_group.RootPart == null)
2771 continue;
2772 2770
2773 // objects rezzed with this method are die_at_edge by default. 2771 // objects rezzed with this method are die_at_edge by default.
2774 new_group.RootPart.SetDieAtEdge(true); 2772 new_group.RootPart.SetDieAtEdge(true);
@@ -6983,10 +6981,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6983 { 6981 {
6984 // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask. 6982 // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask.
6985 SceneObjectPart rootPart = part.ParentGroup.RootPart; 6983 SceneObjectPart rootPart = part.ParentGroup.RootPart;
6986 if (rootPart != null) // better safe than sorry 6984 SetRot(part, rootPart.RotationOffset * Rot2Quaternion(q));
6987 {
6988 SetRot(part, rootPart.RotationOffset * Rot2Quaternion(q));
6989 }
6990 } 6985 }
6991 6986
6992 break; 6987 break;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7f3d84d..3ddd79b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -673,8 +673,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
673 673
674 m_host.AddScriptLPS(1); 674 m_host.AddScriptLPS(1);
675 675
676 if (m_host.ParentGroup.RootPart != null) 676 m_host.ParentGroup.RootPart.SetFloatOnWater(floatYN);
677 m_host.ParentGroup.RootPart.SetFloatOnWater(floatYN);
678 } 677 }
679 678
680 // Teleport functions 679 // Teleport functions