aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-29 07:05:33 +0000
committerMelanie Thielker2008-11-29 07:05:33 +0000
commite1153394c1346bd3741590c17ab38c735384e642 (patch)
tree697d4cd70f328f0b35a019f62ea2112b966209a5 /OpenSim/Region/Environment/Scenes
parentTry to prevent attachments twisting/moving (diff)
downloadopensim-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 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs8
2 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index c67d994..c8285a3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2173,6 +2173,7 @@ namespace OpenSim.Region.Environment.Scenes
2173 if (sp != null) 2173 if (sp != null)
2174 parentLocalID = sp.LocalId; 2174 parentLocalID = sp.LocalId;
2175 2175
2176 sceneObject.RootPart.IsAttachment = true;
2176 sceneObject.RootPart.SetParentLocalId(parentLocalID); 2177 sceneObject.RootPart.SetParentLocalId(parentLocalID);
2177 2178
2178 AddRestoredSceneObject(sceneObject, false, false); 2179 AddRestoredSceneObject(sceneObject, false, false);
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)