ODE: added support for Phantom flag. Presently you need to add 1024 to ObjectFlags by hand

afrisby
dan miller 2007-09-09 15:28:15 +00:00
parent 588ab9f090
commit 94b03aa09d
2 changed files with 18 additions and 14 deletions

View File

@ -415,10 +415,11 @@ namespace OpenSim.Region.Environment.Scenes
this.AddEntity(group); this.AddEntity(group);
group.AbsolutePosition = pos; group.AbsolutePosition = pos;
SceneObjectPart rootPart = group.GetChildPart(group.UUID); SceneObjectPart rootPart = group.GetChildPart(group.UUID);
rootPart.PhysActor = phyScene.AddPrim( if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z), rootPart.PhysActor = phyScene.AddPrim(
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z),
new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); rootPart.RotationOffset.Y, rootPart.RotationOffset.Z));
} }
} }

View File

@ -528,10 +528,11 @@ namespace OpenSim.Region.Environment.Scenes
{ {
AddEntityFromStorage(prim); AddEntityFromStorage(prim);
SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); SceneObjectPart rootPart = prim.GetChildPart(prim.UUID);
rootPart.PhysActor = phyScene.AddPrim( if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z), rootPart.PhysActor = phyScene.AddPrim(
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z),
new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); rootPart.RotationOffset.Y, rootPart.RotationOffset.Z));
} }
MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
@ -567,7 +568,8 @@ 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);
rootPart.PhysActor = phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), 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()); new Axiom.Math.Quaternion());
} }
} }
@ -648,11 +650,12 @@ namespace OpenSim.Region.Environment.Scenes
AddEntity(obj); AddEntity(obj);
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
rootPart.PhysActor = phyScene.AddPrim( if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z), rootPart.PhysActor = phyScene.AddPrim(
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z),
new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z));
primCount++; primCount++;
} }
} }