aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs40
1 files changed, 32 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 41fd1e1..7796b8d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1813,14 +1813,22 @@ namespace OpenSim.Region.Framework.Scenes
1813 //m_log.DebugFormat( 1813 //m_log.DebugFormat(
1814 // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); 1814 // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName);
1815 1815
1816 SceneObjectGroup sceneObject = null;
1817
1816 // If an entity creator has been registered for this prim type then use that 1818 // If an entity creator has been registered for this prim type then use that
1817 if (m_entityCreators.ContainsKey((PCode)shape.PCode)) 1819 if (m_entityCreators.ContainsKey((PCode)shape.PCode))
1818 return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); 1820 {
1821 sceneObject = m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape);
1822 }
1823 else
1824 {
1825 // Otherwise, use this default creation code;
1826 sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
1827 AddNewSceneObject(sceneObject, true);
1828 sceneObject.SetGroup(groupID, null);
1829 }
1819 1830
1820 // Otherwise, use this default creation code; 1831 sceneObject.ScheduleGroupForFullUpdate();
1821 SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
1822 AddNewSceneObject(sceneObject, true);
1823 sceneObject.SetGroup(groupID, null);
1824 1832
1825 return sceneObject; 1833 return sceneObject;
1826 } 1834 }
@@ -1848,7 +1856,7 @@ namespace OpenSim.Region.Framework.Scenes
1848 } 1856 }
1849 1857
1850 /// <summary> 1858 /// <summary>
1851 /// Add a newly created object to the scene 1859 /// Add a newly created object to the scene. Updates are also sent to viewers.
1852 /// </summary> 1860 /// </summary>
1853 /// <param name="sceneObject"></param> 1861 /// <param name="sceneObject"></param>
1854 /// <param name="attachToBackup"> 1862 /// <param name="attachToBackup">
@@ -1857,8 +1865,25 @@ namespace OpenSim.Region.Framework.Scenes
1857 /// </param> 1865 /// </param>
1858 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) 1866 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
1859 { 1867 {
1860 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup); 1868 return AddNewSceneObject(sceneObject, attachToBackup, true);
1861 } 1869 }
1870
1871 /// <summary>
1872 /// Add a newly created object to the scene
1873 /// </summary>
1874 /// <param name="sceneObject"></param>
1875 /// <param name="attachToBackup">
1876 /// If true, the object is made persistent into the scene.
1877 /// If false, the object will not persist over server restarts
1878 /// </param>
1879 /// <param name="sendClientUpdates">
1880 /// If true, updates for the new scene object are sent to all viewers in range.
1881 /// If false, it is left to the caller to schedule the update
1882 /// </param>
1883 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
1884 {
1885 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
1886 }
1862 1887
1863 /// <summary> 1888 /// <summary>
1864 /// Delete every object from the scene 1889 /// Delete every object from the scene
@@ -3322,7 +3347,6 @@ namespace OpenSim.Region.Framework.Scenes
3322 } 3347 }
3323 else 3348 else
3324 m_log.Debug("[SCENE]: Unable to register with InterregionCommsIn"); 3349 m_log.Debug("[SCENE]: Unable to register with InterregionCommsIn");
3325
3326 } 3350 }
3327 3351
3328 /// <summary> 3352 /// <summary>