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 181b7c5..a84f966 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1933,14 +1933,22 @@ namespace OpenSim.Region.Framework.Scenes
1933 //m_log.DebugFormat( 1933 //m_log.DebugFormat(
1934 // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); 1934 // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName);
1935 1935
1936 SceneObjectGroup sceneObject = null;
1937
1936 // If an entity creator has been registered for this prim type then use that 1938 // If an entity creator has been registered for this prim type then use that
1937 if (m_entityCreators.ContainsKey((PCode)shape.PCode)) 1939 if (m_entityCreators.ContainsKey((PCode)shape.PCode))
1938 return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); 1940 {
1941 sceneObject = m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape);
1942 }
1943 else
1944 {
1945 // Otherwise, use this default creation code;
1946 sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
1947 AddNewSceneObject(sceneObject, true);
1948 sceneObject.SetGroup(groupID, null);
1949 }
1939 1950
1940 // Otherwise, use this default creation code; 1951 sceneObject.ScheduleGroupForFullUpdate();
1941 SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
1942 AddNewSceneObject(sceneObject, true);
1943 sceneObject.SetGroup(groupID, null);
1944 1952
1945 return sceneObject; 1953 return sceneObject;
1946 } 1954 }
@@ -1968,7 +1976,7 @@ namespace OpenSim.Region.Framework.Scenes
1968 } 1976 }
1969 1977
1970 /// <summary> 1978 /// <summary>
1971 /// Add a newly created object to the scene 1979 /// Add a newly created object to the scene. Updates are also sent to viewers.
1972 /// </summary> 1980 /// </summary>
1973 /// <param name="sceneObject"></param> 1981 /// <param name="sceneObject"></param>
1974 /// <param name="attachToBackup"> 1982 /// <param name="attachToBackup">
@@ -1977,8 +1985,25 @@ namespace OpenSim.Region.Framework.Scenes
1977 /// </param> 1985 /// </param>
1978 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) 1986 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
1979 { 1987 {
1980 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup); 1988 return AddNewSceneObject(sceneObject, attachToBackup, true);
1981 } 1989 }
1990
1991 /// <summary>
1992 /// Add a newly created object to the scene
1993 /// </summary>
1994 /// <param name="sceneObject"></param>
1995 /// <param name="attachToBackup">
1996 /// If true, the object is made persistent into the scene.
1997 /// If false, the object will not persist over server restarts
1998 /// </param>
1999 /// <param name="sendClientUpdates">
2000 /// If true, updates for the new scene object are sent to all viewers in range.
2001 /// If false, it is left to the caller to schedule the update
2002 /// </param>
2003 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
2004 {
2005 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
2006 }
1982 2007
1983 /// <summary> 2008 /// <summary>
1984 /// Delete every object from the scene 2009 /// Delete every object from the scene
@@ -3170,7 +3195,6 @@ namespace OpenSim.Region.Framework.Scenes
3170 m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; 3195 m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
3171 m_sceneGridService.KiPrimitive += SendKillObject; 3196 m_sceneGridService.KiPrimitive += SendKillObject;
3172 m_sceneGridService.OnGetLandData += GetLandData; 3197 m_sceneGridService.OnGetLandData += GetLandData;
3173
3174 } 3198 }
3175 3199
3176 /// <summary> 3200 /// <summary>