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/World/Estate | |
parent | Fix a bug where the non-root parts of rezzed objects that had previously been... (diff) | |
download | opensim-SC_OLD-095b3e5756bb3160b30c9c5670ba008fa13d2e66.zip opensim-SC_OLD-095b3e5756bb3160b30c9c5670ba008fa13d2e66.tar.gz opensim-SC_OLD-095b3e5756bb3160b30c9c5670ba008fa13d2e66.tar.bz2 opensim-SC_OLD-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/World/Estate')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 50 |
1 files changed, 22 insertions, 28 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) |