diff options
author | Melanie | 2010-03-04 10:43:12 +0000 |
---|---|---|
committer | Melanie | 2010-03-04 10:43:12 +0000 |
commit | 31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca (patch) | |
tree | e351c23bd3f773e0ceb4cae518987c73edc90f6d /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Remove a superfluous array creation (diff) | |
parent | compiler warnings revealed that public PlaySoundSlavePrims properties were ch... (diff) | |
download | opensim-SC-31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca.zip opensim-SC-31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca.tar.gz opensim-SC-31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca.tar.bz2 opensim-SC-31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5e5a52e..a880fe7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1906,14 +1906,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
1906 | //m_log.DebugFormat( | 1906 | //m_log.DebugFormat( |
1907 | // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); | 1907 | // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); |
1908 | 1908 | ||
1909 | SceneObjectGroup sceneObject = null; | ||
1910 | |||
1909 | // If an entity creator has been registered for this prim type then use that | 1911 | // If an entity creator has been registered for this prim type then use that |
1910 | if (m_entityCreators.ContainsKey((PCode)shape.PCode)) | 1912 | if (m_entityCreators.ContainsKey((PCode)shape.PCode)) |
1911 | return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); | 1913 | { |
1914 | sceneObject = m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); | ||
1915 | } | ||
1916 | else | ||
1917 | { | ||
1918 | // Otherwise, use this default creation code; | ||
1919 | sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape); | ||
1920 | AddNewSceneObject(sceneObject, true); | ||
1921 | sceneObject.SetGroup(groupID, null); | ||
1922 | } | ||
1912 | 1923 | ||
1913 | // Otherwise, use this default creation code; | 1924 | sceneObject.ScheduleGroupForFullUpdate(); |
1914 | SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape); | ||
1915 | AddNewSceneObject(sceneObject, true); | ||
1916 | sceneObject.SetGroup(groupID, null); | ||
1917 | 1925 | ||
1918 | return sceneObject; | 1926 | return sceneObject; |
1919 | } | 1927 | } |
@@ -1941,7 +1949,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1941 | } | 1949 | } |
1942 | 1950 | ||
1943 | /// <summary> | 1951 | /// <summary> |
1944 | /// Add a newly created object to the scene | 1952 | /// Add a newly created object to the scene. Updates are also sent to viewers. |
1945 | /// </summary> | 1953 | /// </summary> |
1946 | /// <param name="sceneObject"></param> | 1954 | /// <param name="sceneObject"></param> |
1947 | /// <param name="attachToBackup"> | 1955 | /// <param name="attachToBackup"> |
@@ -1950,8 +1958,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
1950 | /// </param> | 1958 | /// </param> |
1951 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | 1959 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) |
1952 | { | 1960 | { |
1953 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup); | 1961 | return AddNewSceneObject(sceneObject, attachToBackup, true); |
1954 | } | 1962 | } |
1963 | |||
1964 | /// <summary> | ||
1965 | /// Add a newly created object to the scene | ||
1966 | /// </summary> | ||
1967 | /// <param name="sceneObject"></param> | ||
1968 | /// <param name="attachToBackup"> | ||
1969 | /// If true, the object is made persistent into the scene. | ||
1970 | /// If false, the object will not persist over server restarts | ||
1971 | /// </param> | ||
1972 | /// <param name="sendClientUpdates"> | ||
1973 | /// If true, updates for the new scene object are sent to all viewers in range. | ||
1974 | /// If false, it is left to the caller to schedule the update | ||
1975 | /// </param> | ||
1976 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) | ||
1977 | { | ||
1978 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); | ||
1979 | } | ||
1955 | 1980 | ||
1956 | /// <summary> | 1981 | /// <summary> |
1957 | /// Delete every object from the scene | 1982 | /// Delete every object from the scene |
@@ -3143,7 +3168,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3143 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; | 3168 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; |
3144 | m_sceneGridService.KiPrimitive += SendKillObject; | 3169 | m_sceneGridService.KiPrimitive += SendKillObject; |
3145 | m_sceneGridService.OnGetLandData += GetLandData; | 3170 | m_sceneGridService.OnGetLandData += GetLandData; |
3146 | |||
3147 | } | 3171 | } |
3148 | 3172 | ||
3149 | /// <summary> | 3173 | /// <summary> |