* refactor: Convert most non SOP methods to use SOG.IsAttachment rather than SOP.IsAttachment
parent
44e377d1fb
commit
9366a234cf
|
@ -611,7 +611,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
{
|
{
|
||||||
if (obj != null)
|
if (obj != null)
|
||||||
{
|
{
|
||||||
if ((obj is SceneObjectGroup) && ((SceneObjectGroup)obj).RootPart != null && !((SceneObjectGroup)obj).RootPart.IsAttachment)
|
if ((obj is SceneObjectGroup) && !((SceneObjectGroup)obj).IsDeleted && !((SceneObjectGroup)obj).IsAttachment)
|
||||||
{
|
{
|
||||||
m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj);
|
m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -757,10 +757,9 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||||
SceneObjectPart part = scene.GetSceneObjectPart(objectID);
|
SceneObjectPart part = scene.GetSceneObjectPart(objectID);
|
||||||
if (part.OwnerID != moverID)
|
if (part.OwnerID != moverID)
|
||||||
{
|
{
|
||||||
if (part.ParentGroup != null &&
|
if (part.ParentGroup != null && !part.ParentGroup.IsDeleted)
|
||||||
part.ParentGroup.RootPart != null)
|
|
||||||
{
|
{
|
||||||
if (part.ParentGroup.RootPart.IsAttachment)
|
if (part.ParentGroup.IsAttachment)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1138,7 +1138,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
SceneObjectGroup group = GetGroupByPrim(localID);
|
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||||
if (group != null)
|
if (group != null)
|
||||||
{
|
{
|
||||||
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment)
|
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment)
|
||||||
{
|
{
|
||||||
group.UpdateSinglePosition(pos, localID);
|
group.UpdateSinglePosition(pos, localID);
|
||||||
}
|
}
|
||||||
|
@ -1158,13 +1158,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
|
|
||||||
// Vector3 oldPos = group.AbsolutePosition;
|
// Vector3 oldPos = group.AbsolutePosition;
|
||||||
if (group.RootPart.IsAttachment)
|
if (group.IsAttachment)
|
||||||
{
|
{
|
||||||
group.UpdateGroupPosition(pos);
|
group.UpdateGroupPosition(pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment)
|
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment)
|
||||||
{
|
{
|
||||||
group.UpdateGroupPosition(pos);
|
group.UpdateGroupPosition(pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//
|
//
|
||||||
part.ParentGroup.IsSelected = false;
|
part.ParentGroup.IsSelected = false;
|
||||||
|
|
||||||
if (part.ParentGroup.RootPart.IsAttachment)
|
if (part.ParentGroup.IsAttachment)
|
||||||
isAttachment = true;
|
isAttachment = true;
|
||||||
else
|
else
|
||||||
part.ParentGroup.ScheduleGroupForFullUpdate();
|
part.ParentGroup.ScheduleGroupForFullUpdate();
|
||||||
|
|
|
@ -225,7 +225,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
Vector3 val = value;
|
Vector3 val = value;
|
||||||
|
|
||||||
if ((val.X > 257f || val.X < -1f || val.Y > 257f || val.Y < -1f) && !m_rootPart.IsAttachment)
|
if ((val.X > 257f || val.X < -1f || val.Y > 257f || val.Y < -1f) && !IsAttachment)
|
||||||
{
|
{
|
||||||
m_scene.CrossPrimGroupIntoNewRegion(val, this);
|
m_scene.CrossPrimGroupIntoNewRegion(val, this);
|
||||||
}
|
}
|
||||||
|
@ -1212,7 +1212,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (HasGroupChanged)
|
if (HasGroupChanged)
|
||||||
{
|
{
|
||||||
// don't backup while it's selected or you're asking for changes mid stream.
|
// don't backup while it's selected or you're asking for changes mid stream.
|
||||||
if ((!IsSelected) && (RootPart != null) && (!m_rootPart.IsAttachment))
|
if (!(IsSelected || IsDeleted || IsAttachment))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[SCENE]: Storing {0}, {1} in {2}",
|
"[SCENE]: Storing {0}, {1} in {2}",
|
||||||
|
@ -1271,7 +1271,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (m_rootPart != null && m_rootPart.UUID == part.UUID)
|
if (m_rootPart != null && m_rootPart.UUID == part.UUID)
|
||||||
{
|
{
|
||||||
if (m_rootPart.IsAttachment)
|
if (IsAttachment)
|
||||||
{
|
{
|
||||||
part.SendFullUpdateToClient(remoteClient, m_rootPart.AttachedPos, clientFlags);
|
part.SendFullUpdateToClient(remoteClient, m_rootPart.AttachedPos, clientFlags);
|
||||||
}
|
}
|
||||||
|
@ -1441,7 +1441,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (rootpart.PhysActor != null)
|
if (rootpart.PhysActor != null)
|
||||||
{
|
{
|
||||||
if (rootpart.IsAttachment)
|
if (IsAttachment)
|
||||||
{
|
{
|
||||||
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
|
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
|
||||||
if (avatar != null)
|
if (avatar != null)
|
||||||
|
@ -1580,7 +1580,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
lock (m_parts)
|
lock (m_parts)
|
||||||
{
|
{
|
||||||
//if (m_rootPart.m_IsAttachment)
|
//if (IsAttachment)
|
||||||
//{
|
//{
|
||||||
//foreach (SceneObjectPart part in m_parts.Values)
|
//foreach (SceneObjectPart part in m_parts.Values)
|
||||||
//{
|
//{
|
||||||
|
@ -2437,7 +2437,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
|
if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
|
||||||
{
|
{
|
||||||
if (m_rootPart.IsAttachment)
|
if (IsAttachment)
|
||||||
{
|
{
|
||||||
m_rootPart.AttachedPos = pos;
|
m_rootPart.AttachedPos = pos;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2861,7 +2861,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
if (m_host.ParentGroup.RootPart.IsAttachment && (UUID)agent == m_host.ParentGroup.RootPart.AttachedAvatar)
|
if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.RootPart.AttachedAvatar)
|
||||||
{
|
{
|
||||||
// When attached, certain permissions are implicit if requested from owner
|
// When attached, certain permissions are implicit if requested from owner
|
||||||
int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS |
|
int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS |
|
||||||
|
|
|
@ -545,7 +545,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
{
|
{
|
||||||
UUID appDomain = assetID;
|
UUID appDomain = assetID;
|
||||||
|
|
||||||
if (part.ParentGroup.RootPart.IsAttachment)
|
if (part.ParentGroup.IsAttachment)
|
||||||
appDomain = part.ParentGroup.RootPart.UUID;
|
appDomain = part.ParentGroup.RootPart.UUID;
|
||||||
|
|
||||||
if (!m_AppDomains.ContainsKey(appDomain))
|
if (!m_AppDomains.ContainsKey(appDomain))
|
||||||
|
|
Loading…
Reference in New Issue