diff options
author | UbitUmarov | 2014-09-09 03:45:26 +0100 |
---|---|---|
committer | UbitUmarov | 2014-09-09 03:45:26 +0100 |
commit | 136749c651daeb017089274890c1fa3ddd7dc0eb (patch) | |
tree | ea8989dee937ec8bbbb41e1e55f73305bcd6c722 /OpenSim/Region/CoreModules/Avatar | |
parent | set default LinksetPhysPrims to 0 so max number of prims for physical (diff) | |
download | opensim-SC-136749c651daeb017089274890c1fa3ddd7dc0eb.zip opensim-SC-136749c651daeb017089274890c1fa3ddd7dc0eb.tar.gz opensim-SC-136749c651daeb017089274890c1fa3ddd7dc0eb.tar.bz2 opensim-SC-136749c651daeb017089274890c1fa3ddd7dc0eb.tar.xz |
drop attachments with original physical proprieties
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index ea6174a..6371a1f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -713,13 +713,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
713 | so.UpdateGroupRotationR(absoluteRot); | 713 | so.UpdateGroupRotationR(absoluteRot); |
714 | } | 714 | } |
715 | 715 | ||
716 | // rootPart.RemFlag(PrimFlags.TemporaryOnRez); | 716 | rootPart.RemFlag(PrimFlags.TemporaryOnRez); |
717 | // rootPart.AddFlag(PrimFlags.Phantom); | ||
718 | |||
719 | // rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false); | ||
720 | 717 | ||
721 | // not physical, not temporary, phaton, not volume detector | 718 | // not physical, not temporary, phaton, not volume detector |
722 | so.UpdatePrimFlags(rootPart.LocalId,false,false,true,rootPart.VolumeDetectActive); | 719 | // so.UpdatePrimFlags(rootPart.LocalId,false,false,true,rootPart.VolumeDetectActive); |
720 | |||
721 | // restore full physical state instead | ||
722 | so.ApplyPhysics(); | ||
723 | 723 | ||
724 | so.HasGroupChanged = true; | 724 | so.HasGroupChanged = true; |
725 | rootPart.Rezzed = DateTime.Now; | 725 | rootPart.Rezzed = DateTime.Now; |
@@ -918,32 +918,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
918 | 918 | ||
919 | so.AttachedAvatar = sp.UUID; | 919 | so.AttachedAvatar = sp.UUID; |
920 | 920 | ||
921 | // if (so.RootPart.PhysActor != null) | ||
922 | // so.RootPart.RemoveFromPhysics(); | ||
923 | |||
924 | foreach (SceneObjectPart part in so.Parts) | 921 | foreach (SceneObjectPart part in so.Parts) |
925 | { | 922 | { |
926 | if (part.KeyframeMotion != null) | 923 | if (part.KeyframeMotion != null) |
927 | { | 924 | part.KeyframeMotion.Suspend(); |
928 | part.KeyframeMotion.Delete(); | ||
929 | part.KeyframeMotion = null; | ||
930 | } | ||
931 | 925 | ||
932 | // if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0)) | ||
933 | // { | ||
934 | // PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed? | ||
935 | // } | ||
936 | // else | ||
937 | if (part.PhysActor != null) | 926 | if (part.PhysActor != null) |
938 | { | 927 | { |
939 | if(part.PhysActor.IsPhysical) | ||
940 | so.Scene.RemovePhysicalPrim(1); | ||
941 | part.RemoveFromPhysics(); | 928 | part.RemoveFromPhysics(); |
942 | } | 929 | } |
943 | } | 930 | } |
944 | 931 | ||
945 | so.RootPart.Flags &= ~PrimFlags.Physics; | ||
946 | |||
947 | so.AbsolutePosition = attachOffset; | 932 | so.AbsolutePosition = attachOffset; |
948 | so.RootPart.AttachedPos = attachOffset; | 933 | so.RootPart.AttachedPos = attachOffset; |
949 | so.IsAttachment = true; | 934 | so.IsAttachment = true; |