diff options
author | Justin Clark-Casey (justincc) | 2011-09-01 01:22:28 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-01 01:22:28 +0100 |
commit | 095b3e5756bb3160b30c9c5670ba008fa13d2e66 (patch) | |
tree | 0052b92cf46d42d714740bb4c7404edbdbaea0de /OpenSim/Region/CoreModules | |
parent | Fix a bug where the non-root parts of rezzed objects that had previously been... (diff) | |
download | opensim-SC-095b3e5756bb3160b30c9c5670ba008fa13d2e66.zip opensim-SC-095b3e5756bb3160b30c9c5670ba008fa13d2e66.tar.gz opensim-SC-095b3e5756bb3160b30c9c5670ba008fa13d2e66.tar.bz2 opensim-SC-095b3e5756bb3160b30c9c5670ba008fa13d2e66.tar.xz |
Remove pointless cluttering SOP.ParentGroup != null checks.
The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database.
At all other times it's not possible for a SOP not to have a SOG parent.
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 24 insertions, 33 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 3aed6ba..d0605e3 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -851,41 +851,35 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
851 | SceneObjectPart prt = Scene.GetSceneObjectPart(obj); | 851 | SceneObjectPart prt = Scene.GetSceneObjectPart(obj); |
852 | if (prt != null) | 852 | if (prt != null) |
853 | { | 853 | { |
854 | if (prt.ParentGroup != null) | 854 | SceneObjectGroup sog = prt.ParentGroup; |
855 | LandStatReportItem lsri = new LandStatReportItem(); | ||
856 | lsri.LocationX = sog.AbsolutePosition.X; | ||
857 | lsri.LocationY = sog.AbsolutePosition.Y; | ||
858 | lsri.LocationZ = sog.AbsolutePosition.Z; | ||
859 | lsri.Score = SceneData[obj]; | ||
860 | lsri.TaskID = sog.UUID; | ||
861 | lsri.TaskLocalID = sog.LocalId; | ||
862 | lsri.TaskName = sog.GetPartName(obj); | ||
863 | lsri.OwnerName = "waiting"; | ||
864 | lock (uuidNameLookupList) | ||
865 | uuidNameLookupList.Add(sog.OwnerID); | ||
866 | |||
867 | if (filter.Length != 0) | ||
855 | { | 868 | { |
856 | SceneObjectGroup sog = prt.ParentGroup; | 869 | if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter))) |
857 | if (sog != null) | ||
858 | { | 870 | { |
859 | LandStatReportItem lsri = new LandStatReportItem(); | 871 | } |
860 | lsri.LocationX = sog.AbsolutePosition.X; | 872 | else |
861 | lsri.LocationY = sog.AbsolutePosition.Y; | 873 | { |
862 | lsri.LocationZ = sog.AbsolutePosition.Z; | 874 | continue; |
863 | lsri.Score = SceneData[obj]; | ||
864 | lsri.TaskID = sog.UUID; | ||
865 | lsri.TaskLocalID = sog.LocalId; | ||
866 | lsri.TaskName = sog.GetPartName(obj); | ||
867 | lsri.OwnerName = "waiting"; | ||
868 | lock (uuidNameLookupList) | ||
869 | uuidNameLookupList.Add(sog.OwnerID); | ||
870 | |||
871 | if (filter.Length != 0) | ||
872 | { | ||
873 | if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter))) | ||
874 | { | ||
875 | } | ||
876 | else | ||
877 | { | ||
878 | continue; | ||
879 | } | ||
880 | } | ||
881 | |||
882 | SceneReport.Add(lsri); | ||
883 | } | 875 | } |
884 | } | 876 | } |
885 | } | ||
886 | 877 | ||
878 | SceneReport.Add(lsri); | ||
879 | } | ||
887 | } | 880 | } |
888 | } | 881 | } |
882 | |||
889 | remoteClient.SendLandStatReply(reportType, requestFlags, (uint)SceneReport.Count,SceneReport.ToArray()); | 883 | remoteClient.SendLandStatReply(reportType, requestFlags, (uint)SceneReport.Count,SceneReport.ToArray()); |
890 | 884 | ||
891 | if (uuidNameLookupList.Count > 0) | 885 | if (uuidNameLookupList.Count > 0) |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index be399ff..8b78701 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) | 85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) |
86 | { | 86 | { |
87 | SceneObjectPart part = m_scene.GetSceneObjectPart(localID); | 87 | SceneObjectPart part = m_scene.GetSceneObjectPart(localID); |
88 | if (part == null || part.ParentGroup == null) | 88 | if (part == null) |
89 | return; | 89 | return; |
90 | 90 | ||
91 | if (part.ParentGroup.IsDeleted) | 91 | if (part.ParentGroup.IsDeleted) |
@@ -111,9 +111,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
111 | if (part == null) | 111 | if (part == null) |
112 | return false; | 112 | return false; |
113 | 113 | ||
114 | if (part.ParentGroup == null) | ||
115 | return false; | ||
116 | |||
117 | SceneObjectGroup group = part.ParentGroup; | 114 | SceneObjectGroup group = part.ParentGroup; |
118 | 115 | ||
119 | switch (saleType) | 116 | switch (saleType) |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 7cb3751..b9bd9a4 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1131,7 +1131,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1131 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); | 1131 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); |
1132 | if (part.OwnerID != moverID) | 1132 | if (part.OwnerID != moverID) |
1133 | { | 1133 | { |
1134 | if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) | 1134 | if (!part.ParentGroup.IsDeleted) |
1135 | { | 1135 | { |
1136 | if (part.ParentGroup.IsAttachment) | 1136 | if (part.ParentGroup.IsAttachment) |
1137 | return false; | 1137 | return false; |