From 1fb47bc4c5ef7409b853efcfb826b6f60805636a Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Mon, 10 Sep 2007 19:35:51 +0000 Subject: Make grass and trees phantom by default. Same behavior as LL grid. --- OpenSim/Region/Environment/Scenes/Scene.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 3e81223..5f9cb21 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -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()); -- cgit v1.1