Make grass and trees phantom by default. Same behavior as LL grid.
parent
31fd84c847
commit
1fb47bc4c5
|
@ -566,6 +566,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape);
|
SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape);
|
||||||
AddEntity(sceneOb);
|
AddEntity(sceneOb);
|
||||||
SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
|
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)
|
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),
|
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());
|
new Axiom.Math.Quaternion());
|
||||||
|
|
Loading…
Reference in New Issue