diff options
author | Justin Clark-Casey (justincc) | 2011-09-01 02:09:41 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-01 02:11:00 +0100 |
commit | 7eca929686bd2db1cb42f5c9740fd1d186cdc8b1 (patch) | |
tree | 775f07f365acb56bc6043831d5832c2dac468ade /OpenSim/Region/ScriptEngine | |
parent | refactor: use ParentGroup.UUID directly instead of SOP.GetRootPartUUID() (diff) | |
download | opensim-SC-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.zip opensim-SC-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.tar.gz opensim-SC-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.tar.bz2 opensim-SC-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')
3 files changed, 3 insertions, 13 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 |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 08dc71e..5c4174e 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -99,11 +99,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
99 | m_log.Debug("Paid: " + objectID + " from " + agentID + ", amount " + amount); | 99 | m_log.Debug("Paid: " + objectID + " from " + agentID + ", amount " + amount); |
100 | 100 | ||
101 | part = part.ParentGroup.RootPart; | 101 | part = part.ParentGroup.RootPart; |
102 | 102 | money(part.LocalId, agentID, amount); | |
103 | if (part != null) | ||
104 | { | ||
105 | money(part.LocalId, agentID, amount); | ||
106 | } | ||
107 | } | 103 | } |
108 | 104 | ||
109 | /// <summary> | 105 | /// <summary> |