mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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.
This commit is contained in:
@@ -851,41 +851,35 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
SceneObjectPart prt = Scene.GetSceneObjectPart(obj);
|
||||
if (prt != null)
|
||||
{
|
||||
if (prt.ParentGroup != null)
|
||||
SceneObjectGroup sog = prt.ParentGroup;
|
||||
LandStatReportItem lsri = new LandStatReportItem();
|
||||
lsri.LocationX = sog.AbsolutePosition.X;
|
||||
lsri.LocationY = sog.AbsolutePosition.Y;
|
||||
lsri.LocationZ = sog.AbsolutePosition.Z;
|
||||
lsri.Score = SceneData[obj];
|
||||
lsri.TaskID = sog.UUID;
|
||||
lsri.TaskLocalID = sog.LocalId;
|
||||
lsri.TaskName = sog.GetPartName(obj);
|
||||
lsri.OwnerName = "waiting";
|
||||
lock (uuidNameLookupList)
|
||||
uuidNameLookupList.Add(sog.OwnerID);
|
||||
|
||||
if (filter.Length != 0)
|
||||
{
|
||||
SceneObjectGroup sog = prt.ParentGroup;
|
||||
if (sog != null)
|
||||
if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter)))
|
||||
{
|
||||
LandStatReportItem lsri = new LandStatReportItem();
|
||||
lsri.LocationX = sog.AbsolutePosition.X;
|
||||
lsri.LocationY = sog.AbsolutePosition.Y;
|
||||
lsri.LocationZ = sog.AbsolutePosition.Z;
|
||||
lsri.Score = SceneData[obj];
|
||||
lsri.TaskID = sog.UUID;
|
||||
lsri.TaskLocalID = sog.LocalId;
|
||||
lsri.TaskName = sog.GetPartName(obj);
|
||||
lsri.OwnerName = "waiting";
|
||||
lock (uuidNameLookupList)
|
||||
uuidNameLookupList.Add(sog.OwnerID);
|
||||
|
||||
if (filter.Length != 0)
|
||||
{
|
||||
if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter)))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
SceneReport.Add(lsri);
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SceneReport.Add(lsri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
remoteClient.SendLandStatReply(reportType, requestFlags, (uint)SceneReport.Count,SceneReport.ToArray());
|
||||
|
||||
if (uuidNameLookupList.Count > 0)
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
|
||||
IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice)
|
||||
{
|
||||
SceneObjectPart part = m_scene.GetSceneObjectPart(localID);
|
||||
if (part == null || part.ParentGroup == null)
|
||||
if (part == null)
|
||||
return;
|
||||
|
||||
if (part.ParentGroup.IsDeleted)
|
||||
@@ -111,9 +111,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
|
||||
if (part == null)
|
||||
return false;
|
||||
|
||||
if (part.ParentGroup == null)
|
||||
return false;
|
||||
|
||||
SceneObjectGroup group = part.ParentGroup;
|
||||
|
||||
switch (saleType)
|
||||
|
||||
@@ -1131,7 +1131,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
SceneObjectPart part = scene.GetSceneObjectPart(objectID);
|
||||
if (part.OwnerID != moverID)
|
||||
{
|
||||
if (part.ParentGroup != null && !part.ParentGroup.IsDeleted)
|
||||
if (!part.ParentGroup.IsDeleted)
|
||||
{
|
||||
if (part.ParentGroup.IsAttachment)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user