diff options
author | Justin Clarke Casey | 2008-06-27 14:25:36 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-27 14:25:36 +0000 |
commit | 836557a2f7a0bfae129626b54150cefd782cbaf9 (patch) | |
tree | 823c008e343c4e1dd61a8300bb0506612073fc8f /OpenSim/Region/Environment/Scenes | |
parent | added in new type for mapping texture objects to the db (diff) | |
download | opensim-SC_OLD-836557a2f7a0bfae129626b54150cefd782cbaf9.zip opensim-SC_OLD-836557a2f7a0bfae129626b54150cefd782cbaf9.tar.gz opensim-SC_OLD-836557a2f7a0bfae129626b54150cefd782cbaf9.tar.bz2 opensim-SC_OLD-836557a2f7a0bfae129626b54150cefd782cbaf9.tar.xz |
* refactor: fission InnerScene.AddSceneObject()
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
4 files changed, 24 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index c7068fa..5256c9e 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -210,6 +210,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
210 | 210 | ||
211 | AddSceneObject(sceneObject, attachToBackup); | 211 | AddSceneObject(sceneObject, attachToBackup); |
212 | } | 212 | } |
213 | |||
214 | /// <summary> | ||
215 | /// Add a newly created object to the scene. This will both update the scene, and send information about the | ||
216 | /// new object to all clients interested in the scene. | ||
217 | /// </summary> | ||
218 | /// <param name="sceneObject"></param> | ||
219 | /// <param name="attachToBackup"> | ||
220 | /// If true, the object is made persistent into the scene. | ||
221 | /// If false, the object will not persist over server restarts | ||
222 | /// </param> | ||
223 | /// <returns>true if the object was added, false if an object with the same uuid was already in the scene | ||
224 | /// </returns> | ||
225 | protected internal void AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | ||
226 | { | ||
227 | AddSceneObject(sceneObject, attachToBackup); | ||
228 | } | ||
213 | 229 | ||
214 | /// <summary> | 230 | /// <summary> |
215 | /// Add an object to the scene. This will both update the scene, and send information about the | 231 | /// Add an object to the scene. This will both update the scene, and send information about the |
@@ -222,7 +238,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
222 | /// </param> | 238 | /// </param> |
223 | /// <returns>true if the object was added, false if an object with the same uuid was already in the scene | 239 | /// <returns>true if the object was added, false if an object with the same uuid was already in the scene |
224 | /// </returns> | 240 | /// </returns> |
225 | protected internal bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | 241 | protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) |
226 | { | 242 | { |
227 | sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim); | 243 | sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim); |
228 | sceneObject.ScheduleGroupForFullUpdate(); | 244 | sceneObject.ScheduleGroupForFullUpdate(); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 2bd2bad..adf3254 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -1795,7 +1795,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1795 | 1795 | ||
1796 | group.ResetIDs(); | 1796 | group.ResetIDs(); |
1797 | 1797 | ||
1798 | AddSceneObject(group, true); | 1798 | AddNewSceneObject(group, true); |
1799 | 1799 | ||
1800 | // if attachment we set it's asset id so object updates can reflect that | 1800 | // if attachment we set it's asset id so object updates can reflect that |
1801 | // if not, we set it's position in world. | 1801 | // if not, we set it's position in world. |
@@ -1917,7 +1917,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1917 | } | 1917 | } |
1918 | group.ResetIDs(); | 1918 | group.ResetIDs(); |
1919 | 1919 | ||
1920 | AddSceneObject(group, true); | 1920 | AddNewSceneObject(group, true); |
1921 | 1921 | ||
1922 | // Set the startup parameter for on_rez event and llGetStartParameter() function | 1922 | // Set the startup parameter for on_rez event and llGetStartParameter() function |
1923 | group.StartParameter = param; | 1923 | group.StartParameter = param; |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ecb54e6..a5805af 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1609,7 +1609,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1609 | AdaptTree(ref shape); | 1609 | AdaptTree(ref shape); |
1610 | } | 1610 | } |
1611 | 1611 | ||
1612 | AddSceneObject(sceneOb, true); | 1612 | AddNewSceneObject(sceneOb, true); |
1613 | 1613 | ||
1614 | return sceneOb; | 1614 | return sceneOb; |
1615 | } | 1615 | } |
@@ -1657,16 +1657,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1657 | } | 1657 | } |
1658 | 1658 | ||
1659 | /// <summary> | 1659 | /// <summary> |
1660 | /// Add an object to the scene | 1660 | /// Add a newly created object to the scene |
1661 | /// </summary> | 1661 | /// </summary> |
1662 | /// <param name="sceneObject"></param> | 1662 | /// <param name="sceneObject"></param> |
1663 | /// <param name="attachToBackup"> | 1663 | /// <param name="attachToBackup"> |
1664 | /// If true, the object is made persistent into the scene. | 1664 | /// If true, the object is made persistent into the scene. |
1665 | /// If false, the object will not persist over server restarts | 1665 | /// If false, the object will not persist over server restarts |
1666 | /// </param> | 1666 | /// </param> |
1667 | public void AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | 1667 | public void AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) |
1668 | { | 1668 | { |
1669 | m_innerScene.AddSceneObject(sceneObject, attachToBackup); | 1669 | m_innerScene.AddNewSceneObject(sceneObject, attachToBackup); |
1670 | } | 1670 | } |
1671 | 1671 | ||
1672 | /// <summary> | 1672 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 5236014..dd9c706 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1838 | 1838 | ||
1839 | SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart); | 1839 | SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart); |
1840 | 1840 | ||
1841 | m_scene.AddSceneObject(objectGroup, true); | 1841 | m_scene.AddNewSceneObject(objectGroup, true); |
1842 | 1842 | ||
1843 | ScheduleGroupForFullUpdate(); | 1843 | ScheduleGroupForFullUpdate(); |
1844 | } | 1844 | } |