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:
Justin Clark-Casey (justincc)
2011-09-01 01:22:28 +01:00
parent 083ba72b28
commit 095b3e5756
16 changed files with 278 additions and 428 deletions

View File

@@ -4756,10 +4756,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
SceneObjectPart part = (SceneObjectPart)entity;
if (part.ParentGroup != null)
attachPoint = part.ParentGroup.AttachmentPoint;
else
attachPoint = 0;
attachPoint = part.ParentGroup.AttachmentPoint;
// m_log.DebugFormat(
// "[LLCLIENTVIEW]: Sending attachPoint {0} for {1} {2} to {3}",
@@ -4921,7 +4918,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//update.JointType = 0;
update.Material = data.Material;
update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
if (data.ParentGroup != null && data.ParentGroup.IsAttachment)
if (data.ParentGroup.IsAttachment)
{
update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.FromItemID);
update.State = (byte)((data.ParentGroup.AttachmentPoint % 16) * 16 + (data.ParentGroup.AttachmentPoint / 16));