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 ab0d397..fec8aa7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1840,14 +1840,22 @@ namespace OpenSim.Region.Framework.Scenes
1840 //m_log.DebugFormat( 1840 //m_log.DebugFormat(
1841 // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); 1841 // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName);
1842 1842
1843 SceneObjectGroup sceneObject = null;
1844
1843 // If an entity creator has been registered for this prim type then use that 1845 // If an entity creator has been registered for this prim type then use that
1844 if (m_entityCreators.ContainsKey((PCode)shape.PCode)) 1846 if (m_entityCreators.ContainsKey((PCode)shape.PCode))
1845 return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); 1847 {
1848 sceneObject = m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape);
1849 }
1850 else
1851 {
1852 // Otherwise, use this default creation code;
1853 sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
1854 AddNewSceneObject(sceneObject, true);
1855 sceneObject.SetGroup(groupID, null);
1856 }
1846 1857
1847 // Otherwise, use this default creation code; 1858 sceneObject.ScheduleGroupForFullUpdate();
1848 SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
1849 AddNewSceneObject(sceneObject, true);
1850 sceneObject.SetGroup(groupID, null);
1851 1859
1852 return sceneObject; 1860 return sceneObject;
1853 } 1861 }
@@ -1875,7 +1883,7 @@ namespace OpenSim.Region.Framework.Scenes
1875 } 1883 }
1876 1884
1877 /// <summary> 1885 /// <summary>
1878 /// Add a newly created object to the scene 1886 /// Add a newly created object to the scene. Updates are also sent to viewers.
1879 /// </summary> 1887 /// </summary>
1880 /// <param name="sceneObject"></param> 1888 /// <param name="sceneObject"></param>
1881 /// <param name="attachToBackup"> 1889 /// <param name="attachToBackup">
@@ -1884,8 +1892,25 @@ namespace OpenSim.Region.Framework.Scenes
1884 /// </param> 1892 /// </param>
1885 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) 1893 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
1886 { 1894 {
1887 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup); 1895 return AddNewSceneObject(sceneObject, attachToBackup, true);
1888 } 1896 }
1897
1898 /// <summary>
1899 /// Add a newly created object to the scene
1900 /// </summary>
1901 /// <param name="sceneObject"></param>
1902 /// <param name="attachToBackup">
1903 /// If true, the object is made persistent into the scene.
1904 /// If false, the object will not persist over server restarts
1905 /// </param>
1906 /// <param name="sendClientUpdates">
1907 /// If true, updates for the new scene object are sent to all viewers in range.
1908 /// If false, it is left to the caller to schedule the update
1909 /// </param>
1910 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
1911 {
1912 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
1913 }
1889 1914
1890 /// <summary> 1915 /// <summary>
1891 /// Delete every object from the scene 1916 /// Delete every object from the scene
@@ -3349,7 +3374,6 @@ namespace OpenSim.Region.Framework.Scenes
3349 } 3374 }
3350 else 3375 else
3351 m_log.Debug("[SCENE]: Unable to register with InterregionCommsIn"); 3376 m_log.Debug("[SCENE]: Unable to register with InterregionCommsIn");
3352
3353 } 3377 }
3354 3378
3355 /// <summary> 3379 /// <summary>