diff options
author | Melanie Thielker | 2008-11-29 07:05:33 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-29 07:05:33 +0000 |
commit | e1153394c1346bd3741590c17ab38c735384e642 (patch) | |
tree | 697d4cd70f328f0b35a019f62ea2112b966209a5 /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |
parent | Try to prevent attachments twisting/moving (diff) | |
download | opensim-SC_OLD-e1153394c1346bd3741590c17ab38c735384e642.zip opensim-SC_OLD-e1153394c1346bd3741590c17ab38c735384e642.tar.gz opensim-SC_OLD-e1153394c1346bd3741590c17ab38c735384e642.tar.bz2 opensim-SC_OLD-e1153394c1346bd3741590c17ab38c735384e642.tar.xz |
Stop attachments from twisting away. Thismakes attachments phantom, which
is the proper way to handle this
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 9fa4405..b15aff8 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -541,7 +541,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
541 | get | 541 | get |
542 | { | 542 | { |
543 | // We don't want the physics engine mucking up the rotations in a linkset | 543 | // We don't want the physics engine mucking up the rotations in a linkset |
544 | if (PhysActor != null && _parentID == 0) | 544 | if ((_parentID == 0) && (Shape.PCode != 9 || Shape.State == 0) && (PhysActor != null)) |
545 | { | 545 | { |
546 | if (PhysActor.Orientation.X != 0 || PhysActor.Orientation.Y != 0 | 546 | if (PhysActor.Orientation.X != 0 || PhysActor.Orientation.Y != 0 |
547 | || PhysActor.Orientation.Z != 0 || PhysActor.Orientation.W != 0) | 547 | || PhysActor.Orientation.Z != 0 || PhysActor.Orientation.W != 0) |
@@ -1193,8 +1193,8 @@ if (m_shape != null) { | |||
1193 | // Added clarification.. since A rigid body is an object that you can kick around, etc. | 1193 | // Added clarification.. since A rigid body is an object that you can kick around, etc. |
1194 | bool RigidBody = isPhysical && !isPhantom; | 1194 | bool RigidBody = isPhysical && !isPhantom; |
1195 | 1195 | ||
1196 | // The only time the physics scene shouldn't know about the prim is if it's phantom | 1196 | // 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 |
1197 | if (!isPhantom) | 1197 | if (!isPhantom && !IsAttachment) |
1198 | { | 1198 | { |
1199 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( | 1199 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( |
1200 | Name, | 1200 | Name, |
@@ -3090,7 +3090,7 @@ if (m_shape != null) { | |||
3090 | } | 3090 | } |
3091 | } | 3091 | } |
3092 | 3092 | ||
3093 | if (IsPhantom) | 3093 | if (IsPhantom || IsAttachment) |
3094 | { | 3094 | { |
3095 | AddFlag(PrimFlags.Phantom); | 3095 | AddFlag(PrimFlags.Phantom); |
3096 | if (PhysActor != null) | 3096 | if (PhysActor != null) |