Null checking ParentGroup is not needed. It can't be null.

viewer-2-initial-appearance
Melanie 2010-12-14 12:07:35 +00:00
parent 4bdba0a487
commit e47cc10674
1 changed files with 2 additions and 4 deletions

View File

@ -1704,8 +1704,7 @@ namespace OpenSim.Region.Framework.Scenes
// Reset sit target. // Reset sit target.
if (part.GetAvatarOnSitTarget() == UUID) if (part.GetAvatarOnSitTarget() == UUID)
part.SitTargetAvatar = UUID.Zero; part.SitTargetAvatar = UUID.Zero;
if (part.ParentGroup != null) part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
m_parentPosition = part.GetWorldPosition(); m_parentPosition = part.GetWorldPosition();
ControllingClient.SendClearFollowCamProperties(part.ParentUUID); ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
@ -1814,8 +1813,7 @@ namespace OpenSim.Region.Framework.Scenes
sitOrientation = avSitOrientation; sitOrientation = avSitOrientation;
autopilot = false; autopilot = false;
} }
if (part.ParentGroup != null) part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
pos = part.AbsolutePosition + offset; pos = part.AbsolutePosition + offset;
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1) //if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)