* furhter simplify test setups for objects

0.6.3-post-fixes
Justin Clarke Casey 2009-01-30 18:38:32 +00:00
parent 7a751f6940
commit f351ab62ec
1 changed files with 6 additions and 10 deletions

View File

@ -202,7 +202,7 @@ namespace OpenSim.Tests.Common.Setup
/// <returns></returns> /// <returns></returns>
public static SceneObjectPart AddSceneObject(Scene scene) public static SceneObjectPart AddSceneObject(Scene scene)
{ {
return AddSceneObject(scene, null); return AddSceneObject(scene, "Test Object");
} }
/// <summary> /// <summary>
@ -212,19 +212,15 @@ namespace OpenSim.Tests.Common.Setup
/// <param name="name"></param> /// <param name="name"></param>
/// <returns></returns> /// <returns></returns>
public static SceneObjectPart AddSceneObject(Scene scene, string name) public static SceneObjectPart AddSceneObject(Scene scene, string name)
{ {
SceneObjectGroup sceneObject = new SceneObjectGroup();
SceneObjectPart part SceneObjectPart part
= new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero);
part.Name = name;
if (name != null)
part.Name = name;
//part.UpdatePrimFlags(false, false, true); //part.UpdatePrimFlags(false, false, true);
//part.ObjectFlags |= (uint)PrimFlags.Phantom; //part.ObjectFlags |= (uint)PrimFlags.Phantom;
sceneObject.SetRootPart(part);
scene.AddNewSceneObject(new SceneObjectGroup(part), false);
scene.AddNewSceneObject(sceneObject, false);
return part; return part;
} }