diff options
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
4 files changed, 72 insertions, 46 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 2d46a5b..5912a15 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3761,24 +3761,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3761 | { | 3761 | { |
3762 | SceneObjectPart part = (SceneObjectPart)update.Entity; | 3762 | SceneObjectPart part = (SceneObjectPart)update.Entity; |
3763 | 3763 | ||
3764 | // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client | ||
3765 | // will never receive an update after a prim kill. Even then, keeping the kill record may be a good | ||
3766 | // safety measure. | ||
3767 | // | ||
3768 | // If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update | ||
3769 | // after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs | ||
3770 | // updates and kills on different threads with different scheduling strategies, hence this protection. | ||
3771 | // | ||
3772 | // This doesn't appear to apply to child prims - a client will happily ignore these updates | ||
3773 | // after the root prim has been deleted. | ||
3774 | lock (m_killRecord) | ||
3775 | { | ||
3776 | if (m_killRecord.Contains(part.LocalId)) | ||
3777 | continue; | ||
3778 | if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) | ||
3779 | continue; | ||
3780 | } | ||
3781 | |||
3782 | if (part.ParentGroup.IsDeleted) | 3764 | if (part.ParentGroup.IsDeleted) |
3783 | continue; | 3765 | continue; |
3784 | 3766 | ||
@@ -3816,7 +3798,39 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3816 | // attachments until the avatar becomes root. | 3798 | // attachments until the avatar becomes root. |
3817 | if (sp.IsChildAgent) | 3799 | if (sp.IsChildAgent) |
3818 | continue; | 3800 | continue; |
3801 | |||
3802 | // If the object is an attachment we don't want it to be in the kill | ||
3803 | // record. Else attaching from inworld and subsequently dropping | ||
3804 | // it will no longer work. | ||
3805 | lock (m_killRecord) | ||
3806 | { | ||
3807 | m_killRecord.Remove(part.LocalId); | ||
3808 | m_killRecord.Remove(part.ParentGroup.RootPart.LocalId); | ||
3809 | } | ||
3819 | } | 3810 | } |
3811 | else | ||
3812 | { | ||
3813 | // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client | ||
3814 | // will never receive an update after a prim kill. Even then, keeping the kill record may be a good | ||
3815 | // safety measure. | ||
3816 | // | ||
3817 | // If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update | ||
3818 | // after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs | ||
3819 | // updates and kills on different threads with different scheduling strategies, hence this protection. | ||
3820 | // | ||
3821 | // This doesn't appear to apply to child prims - a client will happily ignore these updates | ||
3822 | // after the root prim has been deleted. | ||
3823 | // | ||
3824 | // We ignore this for attachments because attaching something from inworld breaks unless we do. | ||
3825 | lock (m_killRecord) | ||
3826 | { | ||
3827 | if (m_killRecord.Contains(part.LocalId)) | ||
3828 | continue; | ||
3829 | if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) | ||
3830 | continue; | ||
3831 | } | ||
3832 | } | ||
3833 | |||
3820 | if (part.ParentGroup.IsAttachment && m_disableFacelights) | 3834 | if (part.ParentGroup.IsAttachment && m_disableFacelights) |
3821 | { | 3835 | { |
3822 | if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand && | 3836 | if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand && |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 78ae5e9..d7c7283 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -631,19 +631,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
631 | // "[ATTACHMENTS MODULE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2}", | 631 | // "[ATTACHMENTS MODULE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2}", |
632 | // grp.Name, grp.LocalId, remoteClient.Name); | 632 | // grp.Name, grp.LocalId, remoteClient.Name); |
633 | 633 | ||
634 | Vector3 inventoryStoredPosition = new Vector3 | 634 | // Vector3 inventoryStoredPosition = new Vector3 |
635 | (((grp.AbsolutePosition.X > (int)Constants.RegionSize) | 635 | // (((grp.AbsolutePosition.X > (int)Constants.RegionSize) |
636 | ? (float)Constants.RegionSize - 6 | 636 | // ? (float)Constants.RegionSize - 6 |
637 | : grp.AbsolutePosition.X) | 637 | // : grp.AbsolutePosition.X) |
638 | , | 638 | // , |
639 | (grp.AbsolutePosition.Y > (int)Constants.RegionSize) | 639 | // (grp.AbsolutePosition.Y > (int)Constants.RegionSize) |
640 | ? (float)Constants.RegionSize - 6 | 640 | // ? (float)Constants.RegionSize - 6 |
641 | : grp.AbsolutePosition.Y, | 641 | // : grp.AbsolutePosition.Y, |
642 | grp.AbsolutePosition.Z); | 642 | // grp.AbsolutePosition.Z); |
643 | 643 | // | |
644 | Vector3 originalPosition = grp.AbsolutePosition; | 644 | // Vector3 originalPosition = grp.AbsolutePosition; |
645 | 645 | // | |
646 | grp.AbsolutePosition = inventoryStoredPosition; | 646 | // grp.AbsolutePosition = inventoryStoredPosition; |
647 | 647 | ||
648 | // If we're being called from a script, then trying to serialize that same script's state will not complete | 648 | // If we're being called from a script, then trying to serialize that same script's state will not complete |
649 | // in any reasonable time period. Therefore, we'll avoid it. The worst that can happen is that if | 649 | // in any reasonable time period. Therefore, we'll avoid it. The worst that can happen is that if |
@@ -651,7 +651,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
651 | // without state on relog. Arguably, this is what we want anyway. | 651 | // without state on relog. Arguably, this is what we want anyway. |
652 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, false); | 652 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, false); |
653 | 653 | ||
654 | grp.AbsolutePosition = originalPosition; | 654 | // grp.AbsolutePosition = originalPosition; |
655 | 655 | ||
656 | AssetBase asset = m_scene.CreateAsset( | 656 | AssetBase asset = m_scene.CreateAsset( |
657 | grp.GetPartName(grp.LocalId), | 657 | grp.GetPartName(grp.LocalId), |
@@ -679,21 +679,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
679 | else // oopsies | 679 | else // oopsies |
680 | item.Folder = UUID.Zero; | 680 | item.Folder = UUID.Zero; |
681 | 681 | ||
682 | // Nix the special bits we used to use for slam and the folded perms | ||
683 | uint allowablePermissionsMask = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move); | ||
684 | |||
682 | if ((sp.UUID != grp.RootPart.OwnerID) && m_scene.Permissions.PropagatePermissions()) | 685 | if ((sp.UUID != grp.RootPart.OwnerID) && m_scene.Permissions.PropagatePermissions()) |
683 | { | 686 | { |
684 | item.BasePermissions = grp.RootPart.NextOwnerMask; | 687 | item.BasePermissions = grp.RootPart.BaseMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask; |
685 | item.CurrentPermissions = grp.RootPart.NextOwnerMask; | 688 | item.CurrentPermissions = grp.RootPart.BaseMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask; |
686 | item.NextPermissions = grp.RootPart.NextOwnerMask; | 689 | item.NextPermissions = grp.RootPart.NextOwnerMask & allowablePermissionsMask; |
687 | item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask; | 690 | item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask; |
688 | item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask; | 691 | item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask; |
689 | } | 692 | } |
690 | else | 693 | else |
691 | { | 694 | { |
692 | item.BasePermissions = grp.RootPart.BaseMask; | 695 | item.BasePermissions = grp.RootPart.BaseMask & allowablePermissionsMask; |
693 | item.CurrentPermissions = grp.RootPart.OwnerMask; | 696 | item.CurrentPermissions = grp.RootPart.OwnerMask & allowablePermissionsMask; |
694 | item.NextPermissions = grp.RootPart.NextOwnerMask; | 697 | item.NextPermissions = grp.RootPart.NextOwnerMask & allowablePermissionsMask; |
695 | item.EveryOnePermissions = grp.RootPart.EveryoneMask; | 698 | item.EveryOnePermissions = grp.RootPart.EveryoneMask & allowablePermissionsMask; |
696 | item.GroupPermissions = grp.RootPart.GroupMask; | 699 | item.GroupPermissions = grp.RootPart.GroupMask & allowablePermissionsMask; |
697 | } | 700 | } |
698 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 701 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
699 | 702 | ||
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs index 5109a6a..9a40ab5 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | |||
@@ -1621,12 +1621,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1621 | 1621 | ||
1622 | if (Body != IntPtr.Zero) | 1622 | if (Body != IntPtr.Zero) |
1623 | { | 1623 | { |
1624 | d.BodyDestroy(Body); | 1624 | // d.BodyDestroy(Body); |
1625 | Body = IntPtr.Zero; | 1625 | // Body = IntPtr.Zero; |
1626 | // do a more complet destruction | ||
1627 | DestroyBody(); | ||
1626 | m_log.Warn("[PHYSICS]: MakeBody called having a body"); | 1628 | m_log.Warn("[PHYSICS]: MakeBody called having a body"); |
1627 | } | 1629 | } |
1628 | 1630 | ||
1629 | |||
1630 | if (d.GeomGetBody(prim_geom) != IntPtr.Zero) | 1631 | if (d.GeomGetBody(prim_geom) != IntPtr.Zero) |
1631 | { | 1632 | { |
1632 | d.GeomSetBody(prim_geom, IntPtr.Zero); | 1633 | d.GeomSetBody(prim_geom, IntPtr.Zero); |
@@ -3320,6 +3321,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
3320 | 3321 | ||
3321 | protected void changeBuilding(bool newbuilding) | 3322 | protected void changeBuilding(bool newbuilding) |
3322 | { | 3323 | { |
3324 | // Check if we need to do anything | ||
3325 | if (newbuilding == m_building) | ||
3326 | return; | ||
3327 | |||
3323 | if ((bool)newbuilding) | 3328 | if ((bool)newbuilding) |
3324 | { | 3329 | { |
3325 | m_building = true; | 3330 | m_building = true; |
@@ -4066,4 +4071,4 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
4066 | public Vector3 value; | 4071 | public Vector3 value; |
4067 | } | 4072 | } |
4068 | } | 4073 | } |
4069 | } \ No newline at end of file | 4074 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index eb68038..ea78dc3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1312,6 +1312,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1312 | if (!allow) | 1312 | if (!allow) |
1313 | return; | 1313 | return; |
1314 | 1314 | ||
1315 | if (m_host.ParentGroup.RootPart.PhysActor != null && | ||
1316 | m_host.ParentGroup.RootPart.PhysActor.IsPhysical) | ||
1317 | return; | ||
1318 | |||
1315 | m_host.ScriptSetPhysicsStatus(true); | 1319 | m_host.ScriptSetPhysicsStatus(true); |
1316 | } | 1320 | } |
1317 | else | 1321 | else |