aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2014-09-08 02:19:53 +0100
committerUbitUmarov2014-09-08 02:19:53 +0100
commit2d352e6348a54716664af5dd8b5ca0bfd33a5743 (patch)
tree61bfaa870acf36fbc1b7e2da252214022038985d /OpenSim
parent do not send objectproprieties on sop.SetGroup(). I many cases this will (diff)
downloadopensim-SC_OLD-2d352e6348a54716664af5dd8b5ca0bfd33a5743.zip
opensim-SC_OLD-2d352e6348a54716664af5dd8b5ca0bfd33a5743.tar.gz
opensim-SC_OLD-2d352e6348a54716664af5dd8b5ca0bfd33a5743.tar.bz2
opensim-SC_OLD-2d352e6348a54716664af5dd8b5ca0bfd33a5743.tar.xz
*NEEDS more testing* on attachment drop: fix adding prims to physics
engine, remove disturbing phantom flag. On attach: fix removing prims from physics engine, delete any keyframeMotion, remove physical flag. This is executed in all attachs possible only need on attach from the scene (?), but its where original code removed only root part from physics engine
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs35
1 files changed, 31 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 2c7cd40..0361741 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -710,13 +710,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
710 so.AttachedAvatar = UUID.Zero; 710 so.AttachedAvatar = UUID.Zero;
711 rootPart.SetParentLocalId(0); 711 rootPart.SetParentLocalId(0);
712 so.ClearPartAttachmentData(); 712 so.ClearPartAttachmentData();
713 rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false); 713
714 rootPart.Flags &= ~PrimFlags.Phantom;
715// rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false);
716 so.ApplyPhysics();
717
714 so.HasGroupChanged = true; 718 so.HasGroupChanged = true;
715 rootPart.Rezzed = DateTime.Now; 719 rootPart.Rezzed = DateTime.Now;
716 rootPart.RemFlag(PrimFlags.TemporaryOnRez); 720 rootPart.RemFlag(PrimFlags.TemporaryOnRez);
717 so.AttachToBackup(); 721 so.AttachToBackup();
718 m_scene.EventManager.TriggerParcelPrimCountTainted(); 722 m_scene.EventManager.TriggerParcelPrimCountTainted();
719 rootPart.ScheduleFullUpdate(); 723
724 so.ScheduleGroupForFullUpdate();
725
720 rootPart.ClearUndoState(); 726 rootPart.ClearUndoState();
721 727
722 List<UUID> uuids = new List<UUID>(); 728 List<UUID> uuids = new List<UUID>();
@@ -907,8 +913,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
907 913
908 so.AttachedAvatar = sp.UUID; 914 so.AttachedAvatar = sp.UUID;
909 915
910 if (so.RootPart.PhysActor != null) 916// if (so.RootPart.PhysActor != null)
911 so.RootPart.RemoveFromPhysics(); 917// so.RootPart.RemoveFromPhysics();
918
919 foreach (SceneObjectPart part in so.Parts)
920 {
921 if (part.KeyframeMotion != null)
922 {
923 part.KeyframeMotion.Delete();
924 part.KeyframeMotion = null;
925 }
926
927// if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0))
928// {
929// PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed?
930// }
931// else
932 if (part.PhysActor != null)
933 {
934 part.RemoveFromPhysics();
935 }
936 }
937
938 so.RootPart.Flags &= ~PrimFlags.Physics;
912 939
913 so.AbsolutePosition = attachOffset; 940 so.AbsolutePosition = attachOffset;
914 so.RootPart.AttachedPos = attachOffset; 941 so.RootPart.AttachedPos = attachOffset;