* Fixed a cause of an ODE 'invalid operation for locked space '

afrisby
Teravus Ovares 2007-12-14 17:32:13 +00:00
parent 65a002fc3a
commit a0d1496475
1 changed files with 14 additions and 14 deletions

View File

@ -560,22 +560,22 @@ namespace OpenSim.Region.Environment.Scenes
group.AbsolutePosition = pos;
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
rootPart.ApplySanePermissions();
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0)&& m_physicalPrim);
if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0)
{
PrimitiveBaseShape pbs = rootPart.Shape;
rootPart.PhysActor = PhysicsScene.AddPrimShape(
rootPart.Name,
pbs,
new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y,
rootPart.AbsolutePosition.Z),
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
//bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0)&& m_physicalPrim);
//if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0)
//{
//PrimitiveBaseShape pbs = rootPart.Shape;
//rootPart.PhysActor = PhysicsScene.AddPrimShape(
//rootPart.Name,
//pbs,
//new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y,
// rootPart.AbsolutePosition.Z),
//new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
//new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
// rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
// rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
}
// }
rootPart.ScheduleFullUpdate();
}
}