aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-03-11 08:43:53 +0000
committerUbitUmarov2012-03-11 08:43:53 +0000
commitdab7e0358499702754fbc1aaa932767c77153453 (patch)
treef044e0179a8cd87a5d8a55c4942dd3c7aa266add /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parent more phantom physics ( chODE and a fix in manager physicsactor (diff)
downloadopensim-SC_OLD-dab7e0358499702754fbc1aaa932767c77153453.zip
opensim-SC_OLD-dab7e0358499702754fbc1aaa932767c77153453.tar.gz
opensim-SC_OLD-dab7e0358499702754fbc1aaa932767c77153453.tar.bz2
opensim-SC_OLD-dab7e0358499702754fbc1aaa932767c77153453.tar.xz
bug fix (??) in sog copy()
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs29
1 files changed, 19 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index bb554e1..2654563 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1940,37 +1940,46 @@ namespace OpenSim.Region.Framework.Scenes
1940 { 1940 {
1941 newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); 1941 newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
1942 newPart.LinkNum = part.LinkNum; 1942 newPart.LinkNum = part.LinkNum;
1943 } 1943 if (userExposed)
1944 newPart.ParentID = dupe.m_rootPart.LocalId;
1945 }
1944 else 1946 else
1945 { 1947 {
1946 newPart = dupe.m_rootPart; 1948 newPart = dupe.m_rootPart;
1947 } 1949 }
1950/*
1951 bool isphys = ((newPart.Flags & PrimFlags.Physics) != 0);
1952 bool isphan = ((newPart.Flags & PrimFlags.Phantom) != 0);
1948 1953
1949 // Need to duplicate the physics actor as well 1954 // Need to duplicate the physics actor as well
1950 if (part.PhysActor != null && userExposed) 1955 if (userExposed && (isphys || !isphan || newPart.VolumeDetectActive))
1951 { 1956 {
1952 PrimitiveBaseShape pbs = newPart.Shape; 1957 PrimitiveBaseShape pbs = newPart.Shape;
1953
1954 newPart.PhysActor 1958 newPart.PhysActor
1955 = m_scene.PhysicsScene.AddPrimShape( 1959 = m_scene.PhysicsScene.AddPrimShape(
1956 string.Format("{0}/{1}", newPart.Name, newPart.UUID), 1960 string.Format("{0}/{1}", newPart.Name, newPart.UUID),
1957 pbs, 1961 pbs,
1958 newPart.AbsolutePosition, 1962 newPart.AbsolutePosition,
1959 newPart.Scale, 1963 newPart.Scale,
1960 //newPart.RotationOffset,
1961 newPart.GetWorldRotation(), 1964 newPart.GetWorldRotation(),
1962 part.PhysActor.IsPhysical, 1965 isphys,
1966 isphan,
1963 newPart.LocalId); 1967 newPart.LocalId);
1964 1968
1965 newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); 1969 newPart.DoPhysicsPropertyUpdate(isphys, true);
1966 } 1970 */
1971 if (userExposed)
1972 newPart.ApplyPhysics((uint)newPart.Flags,newPart.VolumeDetectActive,true);
1973// }
1967 } 1974 }
1968 if (dupe.m_rootPart.PhysActor != null && userExposed)
1969 dupe.m_rootPart.PhysActor.Building = false; // tell physics to finish building
1970 1975
1971 if (userExposed) 1976 if (userExposed)
1972 { 1977 {
1973 dupe.UpdateParentIDs(); 1978// done above dupe.UpdateParentIDs();
1979
1980 if (dupe.m_rootPart.PhysActor != null)
1981 dupe.m_rootPart.PhysActor.Building = false; // tell physics to finish building
1982
1974 dupe.HasGroupChanged = true; 1983 dupe.HasGroupChanged = true;
1975 dupe.AttachToBackup(); 1984 dupe.AttachToBackup();
1976 1985