diff options
author | Justin Clark-Casey (justincc) | 2010-08-24 23:25:19 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-24 23:25:19 +0100 |
commit | d69e992665495b98fac4ae8c74266294e85804e6 (patch) | |
tree | df7607ffc030aba10a5fba671248541d4bb29005 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-d69e992665495b98fac4ae8c74266294e85804e6.zip opensim-SC_OLD-d69e992665495b98fac4ae8c74266294e85804e6.tar.gz opensim-SC_OLD-d69e992665495b98fac4ae8c74266294e85804e6.tar.bz2 opensim-SC_OLD-d69e992665495b98fac4ae8c74266294e85804e6.tar.xz |
Split out actual scene object insertion code from Scene.Inventory.RezObject and move into SceneGraph.AddNewSceneObject()
The new SceneGraph method is more consumable by region modules that want to extract objects from inventory and add them to the scene in separate stages.
This change also reduces the number of redundant client updates scheduled when an object is rezzed directly by a script or region module
This code does not touch direct rez by a user
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a147628..b808c6d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -42,7 +42,6 @@ using OpenMetaverse.Imaging; | |||
42 | using OpenSim.Framework; | 42 | using OpenSim.Framework; |
43 | using OpenSim.Services.Interfaces; | 43 | using OpenSim.Services.Interfaces; |
44 | using OpenSim.Framework.Communications; | 44 | using OpenSim.Framework.Communications; |
45 | |||
46 | using OpenSim.Framework.Console; | 45 | using OpenSim.Framework.Console; |
47 | using OpenSim.Region.Framework.Interfaces; | 46 | using OpenSim.Region.Framework.Interfaces; |
48 | using OpenSim.Region.Framework.Scenes.Scripting; | 47 | using OpenSim.Region.Framework.Scenes.Scripting; |
@@ -2008,6 +2007,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
2008 | { | 2007 | { |
2009 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); | 2008 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
2010 | } | 2009 | } |
2010 | |||
2011 | /// <summary> | ||
2012 | /// Add a newly created object to the scene. | ||
2013 | /// </summary> | ||
2014 | /// | ||
2015 | /// This method does not send updates to the client - callers need to handle this themselves. | ||
2016 | /// <param name="sceneObject"></param> | ||
2017 | /// <param name="attachToBackup"></param> | ||
2018 | /// <param name="pos">Position of the object</param> | ||
2019 | /// <param name="rot">Rotation of the object</param> | ||
2020 | /// <param name="vel">Velocity of the object. This parameter only has an effect if the object is physical</param> | ||
2021 | /// <returns></returns> | ||
2022 | public bool AddNewSceneObject( | ||
2023 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) | ||
2024 | { | ||
2025 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel); | ||
2026 | } | ||
2011 | 2027 | ||
2012 | /// <summary> | 2028 | /// <summary> |
2013 | /// Delete every object from the scene. This does not include attachments worn by avatars. | 2029 | /// Delete every object from the scene. This does not include attachments worn by avatars. |