diff options
Diffstat (limited to 'OpenSim')
3 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 43c7e7d..4c11135 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -387,7 +387,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
387 | inventoryStoredPosition = objectGroup.RootPart.AttachOffset; | 387 | inventoryStoredPosition = objectGroup.RootPart.AttachOffset; |
388 | inventoryStoredRotation = objectGroup.RootPart.AttachRotation; | 388 | inventoryStoredRotation = objectGroup.RootPart.AttachRotation; |
389 | } | 389 | } |
390 | objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; | 390 | |
391 | // Trees could be attached and it's been done, but it makes | ||
392 | // no sense. State must be preserved because it's the tree type | ||
393 | if (objectGroup.RootPart.Shape.PCode != (byte)PCode.Tree && | ||
394 | objectGroup.RootPart.Shape.PCode != (byte)PCode.NewTree) | ||
395 | objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; | ||
391 | 396 | ||
392 | objectGroup.AbsolutePosition = inventoryStoredPosition; | 397 | objectGroup.AbsolutePosition = inventoryStoredPosition; |
393 | objectGroup.RootPart.RotationOffset = inventoryStoredRotation; | 398 | objectGroup.RootPart.RotationOffset = inventoryStoredRotation; |
@@ -791,7 +796,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
791 | g.RootPart.AttachPoint = g.RootPart.Shape.State; | 796 | g.RootPart.AttachPoint = g.RootPart.Shape.State; |
792 | g.RootPart.AttachOffset = g.AbsolutePosition; | 797 | g.RootPart.AttachOffset = g.AbsolutePosition; |
793 | g.RootPart.AttachRotation = g.GroupRotation; | 798 | g.RootPart.AttachRotation = g.GroupRotation; |
794 | g.RootPart.Shape.State = 0; | 799 | if (g.RootPart.Shape.PCode != (byte)PCode.NewTree && |
800 | g.RootPart.Shape.PCode != (byte)PCode.Tree) | ||
801 | g.RootPart.Shape.State = 0; | ||
795 | } | 802 | } |
796 | 803 | ||
797 | objlist.Add(g); | 804 | objlist.Add(g); |
@@ -825,7 +832,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
825 | g.RootPart.AttachPoint = g.RootPart.Shape.State; | 832 | g.RootPart.AttachPoint = g.RootPart.Shape.State; |
826 | g.RootPart.AttachOffset = g.AbsolutePosition; | 833 | g.RootPart.AttachOffset = g.AbsolutePosition; |
827 | g.RootPart.AttachRotation = g.GroupRotation; | 834 | g.RootPart.AttachRotation = g.GroupRotation; |
828 | g.RootPart.Shape.State = 0; | 835 | if (g.RootPart.Shape.PCode != (byte)PCode.NewTree && |
836 | g.RootPart.Shape.PCode != (byte)PCode.Tree) | ||
837 | g.RootPart.Shape.State = 0; | ||
829 | 838 | ||
830 | objlist.Add(g); | 839 | objlist.Add(g); |
831 | XmlElement el = (XmlElement)n; | 840 | XmlElement el = (XmlElement)n; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 69fb6df..0ea4e09 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -272,6 +272,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
272 | { | 272 | { |
273 | AttachmentPoint = 0; | 273 | AttachmentPoint = 0; |
274 | 274 | ||
275 | // Don't zap trees | ||
276 | if (RootPart.Shape.PCode == (byte)PCode.Tree || | ||
277 | RootPart.Shape.PCode == (byte)PCode.NewTree) | ||
278 | return; | ||
279 | |||
275 | // Even though we don't use child part state parameters for attachments any more, we still need to set | 280 | // Even though we don't use child part state parameters for attachments any more, we still need to set |
276 | // these to zero since having them non-zero in rezzed scene objects will crash some clients. Even if | 281 | // these to zero since having them non-zero in rezzed scene objects will crash some clients. Even if |
277 | // we store them correctly, scene objects that we receive from elsewhere might not. | 282 | // we store them correctly, scene objects that we receive from elsewhere might not. |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 884f07c..a47e452 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -398,7 +398,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
398 | objtype = 0; | 398 | objtype = 0; |
399 | 399 | ||
400 | part = ((SceneObjectGroup)ent).RootPart; | 400 | part = ((SceneObjectGroup)ent).RootPart; |
401 | if (part.ParentGroup.AttachmentPoint != 0) // Attached so ignore | 401 | if (part.ParentGroup.RootPart.Shape.PCode != (byte)PCode.Tree && |
402 | part.ParentGroup.RootPart.Shape.PCode != (byte)PCode.NewTree && | ||
403 | part.ParentGroup.AttachmentPoint != 0) // Attached so ignore | ||
402 | continue; | 404 | continue; |
403 | 405 | ||
404 | if (part.Inventory.ContainsScripts()) | 406 | if (part.Inventory.ContainsScripts()) |