Make grass and trees phantom by default. Same behavior as LL grid.

afrisby
Brian McBee 2007-09-10 19:35:51 +00:00
parent 31fd84c847
commit 1fb47bc4c5
1 changed files with 6 additions and 0 deletions

View File

@ -566,6 +566,12 @@ namespace OpenSim.Region.Environment.Scenes
SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape);
AddEntity(sceneOb);
SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
// if grass or tree, make phantom
if ((rootPart.Shape.PCode==95) || (rootPart.Shape.PCode==255))
{
rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom;
}
// if not phantom, add to physics
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
rootPart.PhysActor = phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z),
new Axiom.Math.Quaternion());