Merge branch 'master' into careminster

Conflicts:
	OpenSim/Region/Application/OpenSimBase.cs
This commit is contained in:
Melanie
2012-01-31 20:53:49 +00:00
8 changed files with 227 additions and 5 deletions

View File

@@ -2006,6 +2006,7 @@ namespace OpenSim.Region.Framework.Scenes
/// If true, the object is made persistent into the scene.
/// If false, the object will not persist over server restarts
/// </param>
/// <returns>true if the object was added. false if not</returns>
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
{
return AddNewSceneObject(sceneObject, attachToBackup, true);
@@ -2023,6 +2024,7 @@ namespace OpenSim.Region.Framework.Scenes
/// If true, updates for the new scene object are sent to all viewers in range.
/// If false, it is left to the caller to schedule the update
/// </param>
/// <returns>true if the object was added. false if not</returns>
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
{
if (m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates))

View File

@@ -395,11 +395,28 @@ namespace OpenSim.Region.Framework.Scenes
/// </returns>
protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
{
if (sceneObject == null || sceneObject.RootPart.UUID == UUID.Zero)
if (sceneObject == null)
{
m_log.ErrorFormat("[SCENEGRAPH]: Tried to add null scene object");
return false;
}
if (sceneObject.UUID == UUID.Zero)
{
m_log.ErrorFormat(
"[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}",
sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero);
return false;
}
if (Entities.ContainsKey(sceneObject.UUID))
{
// m_log.DebugFormat(
// "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()",
// m_parentScene.RegionInfo.RegionName, sceneObject.UUID);
return false;
}
// m_log.DebugFormat(
// "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}",