Stop attachments from twisting away. Thismakes attachments phantom, which

is the proper way to handle this
0.6.1-post-fixes
Melanie Thielker 2008-11-29 07:05:33 +00:00
parent 179d114daa
commit e1153394c1
2 changed files with 5 additions and 4 deletions

View File

@ -2173,6 +2173,7 @@ namespace OpenSim.Region.Environment.Scenes
if (sp != null) if (sp != null)
parentLocalID = sp.LocalId; parentLocalID = sp.LocalId;
sceneObject.RootPart.IsAttachment = true;
sceneObject.RootPart.SetParentLocalId(parentLocalID); sceneObject.RootPart.SetParentLocalId(parentLocalID);
AddRestoredSceneObject(sceneObject, false, false); AddRestoredSceneObject(sceneObject, false, false);

View File

@ -541,7 +541,7 @@ namespace OpenSim.Region.Environment.Scenes
get get
{ {
// We don't want the physics engine mucking up the rotations in a linkset // We don't want the physics engine mucking up the rotations in a linkset
if (PhysActor != null && _parentID == 0) if ((_parentID == 0) && (Shape.PCode != 9 || Shape.State == 0) && (PhysActor != null))
{ {
if (PhysActor.Orientation.X != 0 || PhysActor.Orientation.Y != 0 if (PhysActor.Orientation.X != 0 || PhysActor.Orientation.Y != 0
|| PhysActor.Orientation.Z != 0 || PhysActor.Orientation.W != 0) || PhysActor.Orientation.Z != 0 || PhysActor.Orientation.W != 0)
@ -1193,8 +1193,8 @@ if (m_shape != null) {
// Added clarification.. since A rigid body is an object that you can kick around, etc. // Added clarification.. since A rigid body is an object that you can kick around, etc.
bool RigidBody = isPhysical && !isPhantom; bool RigidBody = isPhysical && !isPhantom;
// The only time the physics scene shouldn't know about the prim is if it's phantom // The only time the physics scene shouldn't know about the prim is if it's phantom or an attachment, which is phantom by definition
if (!isPhantom) if (!isPhantom && !IsAttachment)
{ {
PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
Name, Name,
@ -3090,7 +3090,7 @@ if (m_shape != null) {
} }
} }
if (IsPhantom) if (IsPhantom || IsAttachment)
{ {
AddFlag(PrimFlags.Phantom); AddFlag(PrimFlags.Phantom);
if (PhysActor != null) if (PhysActor != null)