diff options
author | Justin Clarke Casey | 2008-11-01 22:04:35 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-01 22:04:35 +0000 |
commit | 9366a234cf0dd09c0252f9af8a231c4b2865e556 (patch) | |
tree | 12ac4c2e25b048cb0b3962b1f9b3722b8e124126 /OpenSim/Region | |
parent | Fix a compile warning about unreachable code (diff) | |
download | opensim-SC_OLD-9366a234cf0dd09c0252f9af8a231c4b2865e556.zip opensim-SC_OLD-9366a234cf0dd09c0252f9af8a231c4b2865e556.tar.gz opensim-SC_OLD-9366a234cf0dd09c0252f9af8a231c4b2865e556.tar.bz2 opensim-SC_OLD-9366a234cf0dd09c0252f9af8a231c4b2865e556.tar.xz |
* refactor: Convert most non SOP methods to use SOG.IsAttachment rather than SOP.IsAttachment
Diffstat (limited to 'OpenSim/Region')
7 files changed, 15 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index d595185..a23ec4d 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs | |||
@@ -611,7 +611,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
611 | { | 611 | { |
612 | if (obj != null) | 612 | if (obj != null) |
613 | { | 613 | { |
614 | if ((obj is SceneObjectGroup) && ((SceneObjectGroup)obj).RootPart != null && !((SceneObjectGroup)obj).RootPart.IsAttachment) | 614 | if ((obj is SceneObjectGroup) && !((SceneObjectGroup)obj).IsDeleted && !((SceneObjectGroup)obj).IsAttachment) |
615 | { | 615 | { |
616 | m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj); | 616 | m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj); |
617 | } | 617 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index b6a0c23..0585213 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | |||
@@ -757,10 +757,9 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
757 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); | 757 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); |
758 | if (part.OwnerID != moverID) | 758 | if (part.OwnerID != moverID) |
759 | { | 759 | { |
760 | if (part.ParentGroup != null && | 760 | if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) |
761 | part.ParentGroup.RootPart != null) | ||
762 | { | 761 | { |
763 | if (part.ParentGroup.RootPart.IsAttachment) | 762 | if (part.ParentGroup.IsAttachment) |
764 | return false; | 763 | return false; |
765 | } | 764 | } |
766 | } | 765 | } |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 1e21a58..2189670 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -1138,7 +1138,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1138 | SceneObjectGroup group = GetGroupByPrim(localID); | 1138 | SceneObjectGroup group = GetGroupByPrim(localID); |
1139 | if (group != null) | 1139 | if (group != null) |
1140 | { | 1140 | { |
1141 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment) | 1141 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment) |
1142 | { | 1142 | { |
1143 | group.UpdateSinglePosition(pos, localID); | 1143 | group.UpdateSinglePosition(pos, localID); |
1144 | } | 1144 | } |
@@ -1158,13 +1158,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1158 | { | 1158 | { |
1159 | 1159 | ||
1160 | // Vector3 oldPos = group.AbsolutePosition; | 1160 | // Vector3 oldPos = group.AbsolutePosition; |
1161 | if (group.RootPart.IsAttachment) | 1161 | if (group.IsAttachment) |
1162 | { | 1162 | { |
1163 | group.UpdateGroupPosition(pos); | 1163 | group.UpdateGroupPosition(pos); |
1164 | } | 1164 | } |
1165 | else | 1165 | else |
1166 | { | 1166 | { |
1167 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment) | 1167 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment) |
1168 | { | 1168 | { |
1169 | group.UpdateGroupPosition(pos); | 1169 | group.UpdateGroupPosition(pos); |
1170 | } | 1170 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index e9a381d..c9c7bef 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
169 | // | 169 | // |
170 | part.ParentGroup.IsSelected = false; | 170 | part.ParentGroup.IsSelected = false; |
171 | 171 | ||
172 | if (part.ParentGroup.RootPart.IsAttachment) | 172 | if (part.ParentGroup.IsAttachment) |
173 | isAttachment = true; | 173 | isAttachment = true; |
174 | else | 174 | else |
175 | part.ParentGroup.ScheduleGroupForFullUpdate(); | 175 | part.ParentGroup.ScheduleGroupForFullUpdate(); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index a94e592..6579860 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -225,7 +225,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
225 | { | 225 | { |
226 | Vector3 val = value; | 226 | Vector3 val = value; |
227 | 227 | ||
228 | if ((val.X > 257f || val.X < -1f || val.Y > 257f || val.Y < -1f) && !m_rootPart.IsAttachment) | 228 | if ((val.X > 257f || val.X < -1f || val.Y > 257f || val.Y < -1f) && !IsAttachment) |
229 | { | 229 | { |
230 | m_scene.CrossPrimGroupIntoNewRegion(val, this); | 230 | m_scene.CrossPrimGroupIntoNewRegion(val, this); |
231 | } | 231 | } |
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1212 | if (HasGroupChanged) | 1212 | if (HasGroupChanged) |
1213 | { | 1213 | { |
1214 | // don't backup while it's selected or you're asking for changes mid stream. | 1214 | // don't backup while it's selected or you're asking for changes mid stream. |
1215 | if ((!IsSelected) && (RootPart != null) && (!m_rootPart.IsAttachment)) | 1215 | if (!(IsSelected || IsDeleted || IsAttachment)) |
1216 | { | 1216 | { |
1217 | m_log.DebugFormat( | 1217 | m_log.DebugFormat( |
1218 | "[SCENE]: Storing {0}, {1} in {2}", | 1218 | "[SCENE]: Storing {0}, {1} in {2}", |
@@ -1271,7 +1271,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1271 | { | 1271 | { |
1272 | if (m_rootPart != null && m_rootPart.UUID == part.UUID) | 1272 | if (m_rootPart != null && m_rootPart.UUID == part.UUID) |
1273 | { | 1273 | { |
1274 | if (m_rootPart.IsAttachment) | 1274 | if (IsAttachment) |
1275 | { | 1275 | { |
1276 | part.SendFullUpdateToClient(remoteClient, m_rootPart.AttachedPos, clientFlags); | 1276 | part.SendFullUpdateToClient(remoteClient, m_rootPart.AttachedPos, clientFlags); |
1277 | } | 1277 | } |
@@ -1441,7 +1441,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1441 | { | 1441 | { |
1442 | if (rootpart.PhysActor != null) | 1442 | if (rootpart.PhysActor != null) |
1443 | { | 1443 | { |
1444 | if (rootpart.IsAttachment) | 1444 | if (IsAttachment) |
1445 | { | 1445 | { |
1446 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); | 1446 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); |
1447 | if (avatar != null) | 1447 | if (avatar != null) |
@@ -1580,7 +1580,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1580 | 1580 | ||
1581 | lock (m_parts) | 1581 | lock (m_parts) |
1582 | { | 1582 | { |
1583 | //if (m_rootPart.m_IsAttachment) | 1583 | //if (IsAttachment) |
1584 | //{ | 1584 | //{ |
1585 | //foreach (SceneObjectPart part in m_parts.Values) | 1585 | //foreach (SceneObjectPart part in m_parts.Values) |
1586 | //{ | 1586 | //{ |
@@ -2437,7 +2437,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2437 | { | 2437 | { |
2438 | if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) | 2438 | if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) |
2439 | { | 2439 | { |
2440 | if (m_rootPart.IsAttachment) | 2440 | if (IsAttachment) |
2441 | { | 2441 | { |
2442 | m_rootPart.AttachedPos = pos; | 2442 | m_rootPart.AttachedPos = pos; |
2443 | } | 2443 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a92500c..b16125b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2861,7 +2861,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2861 | 2861 | ||
2862 | m_host.AddScriptLPS(1); | 2862 | m_host.AddScriptLPS(1); |
2863 | 2863 | ||
2864 | if (m_host.ParentGroup.RootPart.IsAttachment && (UUID)agent == m_host.ParentGroup.RootPart.AttachedAvatar) | 2864 | if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.RootPart.AttachedAvatar) |
2865 | { | 2865 | { |
2866 | // When attached, certain permissions are implicit if requested from owner | 2866 | // When attached, certain permissions are implicit if requested from owner |
2867 | int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS | | 2867 | int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS | |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 94d1fa7..9a4cb8b 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -545,7 +545,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
545 | { | 545 | { |
546 | UUID appDomain = assetID; | 546 | UUID appDomain = assetID; |
547 | 547 | ||
548 | if (part.ParentGroup.RootPart.IsAttachment) | 548 | if (part.ParentGroup.IsAttachment) |
549 | appDomain = part.ParentGroup.RootPart.UUID; | 549 | appDomain = part.ParentGroup.RootPart.UUID; |
550 | 550 | ||
551 | if (!m_AppDomains.ContainsKey(appDomain)) | 551 | if (!m_AppDomains.ContainsKey(appDomain)) |