aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorMelanie2010-08-10 19:49:35 +0100
committerMelanie2010-08-10 19:49:35 +0100
commitc2e5d1d20319be54e7cdc8ae1e5a82c640ea6928 (patch)
treef78ebe5ce10d6b5efa0700e381e751296277b7e6 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentRemove 4000+ DOS line endings. Grrr! (diff)
parentChanging prim color generates event CHANGED_COLOR. (diff)
downloadopensim-SC-c2e5d1d20319be54e7cdc8ae1e5a82c640ea6928.zip
opensim-SC-c2e5d1d20319be54e7cdc8ae1e5a82c640ea6928.tar.gz
opensim-SC-c2e5d1d20319be54e7cdc8ae1e5a82c640ea6928.tar.bz2
opensim-SC-c2e5d1d20319be54e7cdc8ae1e5a82c640ea6928.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs53
1 files changed, 24 insertions, 29 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index a862fa2..a0f267c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1619,7 +1619,7 @@ namespace OpenSim.Region.Framework.Scenes
1619 ScheduleGroupForFullUpdate(); 1619 ScheduleGroupForFullUpdate();
1620 } 1620 }
1621 1621
1622 public override void SetText(string text, Vector3 color, double alpha) 1622 public void SetText(string text, Vector3 color, double alpha)
1623 { 1623 {
1624 Color = Color.FromArgb(0xff - (int) (alpha * 0xff), 1624 Color = Color.FromArgb(0xff - (int) (alpha * 0xff),
1625 (int) (color.X * 0xff), 1625 (int) (color.X * 0xff),
@@ -1838,30 +1838,10 @@ namespace OpenSim.Region.Framework.Scenes
1838 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 1838 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
1839 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; 1839 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
1840 1840
1841 if (userExposed) 1841 lockPartsForRead(true);
1842 dupe.m_rootPart.TrimPermissions();
1843
1844 /// may need to create a new Physics actor.
1845 if (dupe.RootPart.PhysActor != null && userExposed)
1846 {
1847 PrimitiveBaseShape pbs = dupe.RootPart.Shape;
1848
1849 dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(
1850 dupe.RootPart.Name,
1851 pbs,
1852 dupe.RootPart.AbsolutePosition,
1853 dupe.RootPart.Scale,
1854 dupe.RootPart.RotationOffset,
1855 dupe.RootPart.PhysActor.IsPhysical);
1856
1857 dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId;
1858 dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
1859 }
1860 1842
1861 List<SceneObjectPart> partList; 1843 List<SceneObjectPart> partList;
1862 1844
1863 lockPartsForRead(true);
1864
1865 partList = new List<SceneObjectPart>(m_parts.Values); 1845 partList = new List<SceneObjectPart>(m_parts.Values);
1866 1846
1867 lockPartsForRead(false); 1847 lockPartsForRead(false);
@@ -1884,14 +1864,30 @@ namespace OpenSim.Region.Framework.Scenes
1884 1864
1885 if (userExposed) 1865 if (userExposed)
1886 { 1866 {
1887 dupe.UpdateParentIDs(); 1867 SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
1888 dupe.HasGroupChanged = true; 1868 newPart.LinkNum = part.LinkNum;
1889 dupe.AttachToBackup();
1890
1891 ScheduleGroupForFullUpdate();
1892 } 1869 }
1870
1871 // Need to duplicate the physics actor as well
1872 if (part.PhysActor != null && userExposed)
1873 {
1874 PrimitiveBaseShape pbs = part.Shape;
1875
1876 part.PhysActor
1877 = m_scene.PhysicsScene.AddPrimShape(
1878 part.Name,
1879 pbs,
1880 part.AbsolutePosition,
1881 part.Scale,
1882 part.RotationOffset,
1883 part.PhysActor.IsPhysical);
1884
1885 part.PhysActor.LocalID = part.LocalId;
1886 part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);
1887 }
1893 } 1888 }
1894 finally 1889
1890 if (userExposed)
1895 { 1891 {
1896 m_dupeInProgress = false; 1892 m_dupeInProgress = false;
1897 } 1893 }
@@ -1909,7 +1905,6 @@ namespace OpenSim.Region.Framework.Scenes
1909 SetRootPart(part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed)); 1905 SetRootPart(part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed));
1910 } 1906 }
1911 1907
1912 public void ScriptSetPhysicsStatus(bool UsePhysics)
1913 { 1908 {
1914 bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0); 1909 bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0);
1915 bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0); 1910 bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0);