aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs44
1 files changed, 30 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 8e74dc8..f1e781c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1016,7 +1016,18 @@ namespace OpenSim.Region.Framework.Scenes
1016 public int LinkNum 1016 public int LinkNum
1017 { 1017 {
1018 get { return m_linkNum; } 1018 get { return m_linkNum; }
1019 set { m_linkNum = value; } 1019 set
1020 {
1021// if (ParentGroup != null)
1022// {
1023// m_log.DebugFormat(
1024// "[SCENE OBJECT PART]: Setting linknum of {0}@{1} to {2} from {3}",
1025// Name, AbsolutePosition, value, m_linkNum);
1026// Util.PrintCallStack();
1027// }
1028
1029 m_linkNum = value;
1030 }
1020 } 1031 }
1021 1032
1022 public byte ClickAction 1033 public byte ClickAction
@@ -2048,7 +2059,7 @@ namespace OpenSim.Region.Framework.Scenes
2048 else 2059 else
2049 m_log.WarnFormat( 2060 m_log.WarnFormat(
2050 "[SCENE OBJECT PART]: Part {0} {1} requested mesh/sculpt data for asset id {2} from asset service but received no data", 2061 "[SCENE OBJECT PART]: Part {0} {1} requested mesh/sculpt data for asset id {2} from asset service but received no data",
2051 Name, LocalId, id); 2062 Name, UUID, id);
2052 } 2063 }
2053 2064
2054 /// <summary> 2065 /// <summary>
@@ -2153,6 +2164,9 @@ namespace OpenSim.Region.Framework.Scenes
2153 /// <param name="isNew"></param> 2164 /// <param name="isNew"></param>
2154 public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew) 2165 public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew)
2155 { 2166 {
2167 if (ParentGroup.Scene == null)
2168 return;
2169
2156 if (!ParentGroup.Scene.PhysicalPrims && UsePhysics) 2170 if (!ParentGroup.Scene.PhysicalPrims && UsePhysics)
2157 return; 2171 return;
2158 2172
@@ -3111,8 +3125,9 @@ namespace OpenSim.Region.Framework.Scenes
3111 if (ParentGroup.IsDeleted) 3125 if (ParentGroup.IsDeleted)
3112 return; 3126 return;
3113 3127
3114 if (ParentGroup.IsAttachment && (ParentGroup.AttachedAvatar != remoteClient.AgentId) && 3128 if (ParentGroup.IsAttachment
3115 (ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38)) 3129 && ParentGroup.AttachedAvatar != remoteClient.AgentId
3130 && ParentGroup.HasPrivateAttachmentPoint)
3116 return; 3131 return;
3117 3132
3118 if (remoteClient.AgentId == OwnerID) 3133 if (remoteClient.AgentId == OwnerID)
@@ -3631,7 +3646,6 @@ namespace OpenSim.Region.Framework.Scenes
3631 hasProfileCut = hasDimple; // is it the same thing? 3646 hasProfileCut = hasDimple; // is it the same thing?
3632 } 3647 }
3633 3648
3634
3635 public void SetGroup(UUID groupID, IClientAPI client) 3649 public void SetGroup(UUID groupID, IClientAPI client)
3636 { 3650 {
3637 // Scene.AddNewPrims() calls with client == null so can't use this. 3651 // Scene.AddNewPrims() calls with client == null so can't use this.
@@ -3661,10 +3675,12 @@ namespace OpenSim.Region.Framework.Scenes
3661 3675
3662 public void SetPhysicsAxisRotation() 3676 public void SetPhysicsAxisRotation()
3663 { 3677 {
3664 if (PhysActor != null) 3678 PhysicsActor pa = PhysActor;
3679
3680 if (pa != null)
3665 { 3681 {
3666 PhysActor.LockAngularMotion(RotationAxis); 3682 pa.LockAngularMotion(RotationAxis);
3667 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 3683 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
3668 } 3684 }
3669 } 3685 }
3670 3686
@@ -4381,7 +4397,7 @@ namespace OpenSim.Region.Framework.Scenes
4381 // For now, we use the NINJA naming scheme for identifying joints. 4397 // For now, we use the NINJA naming scheme for identifying joints.
4382 // In the future, we can support other joint specification schemes such as a 4398 // In the future, we can support other joint specification schemes such as a
4383 // custom checkbox in the viewer GUI. 4399 // custom checkbox in the viewer GUI.
4384 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4400 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4385 { 4401 {
4386 string hingeString = "hingejoint"; 4402 string hingeString = "hingejoint";
4387 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString); 4403 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString);
@@ -4397,7 +4413,7 @@ namespace OpenSim.Region.Framework.Scenes
4397 // For now, we use the NINJA naming scheme for identifying joints. 4413 // For now, we use the NINJA naming scheme for identifying joints.
4398 // In the future, we can support other joint specification schemes such as a 4414 // In the future, we can support other joint specification schemes such as a
4399 // custom checkbox in the viewer GUI. 4415 // custom checkbox in the viewer GUI.
4400 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4416 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4401 { 4417 {
4402 string ballString = "balljoint"; 4418 string ballString = "balljoint";
4403 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString); 4419 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString);
@@ -4413,7 +4429,7 @@ namespace OpenSim.Region.Framework.Scenes
4413 // For now, we use the NINJA naming scheme for identifying joints. 4429 // For now, we use the NINJA naming scheme for identifying joints.
4414 // In the future, we can support other joint specification schemes such as a 4430 // In the future, we can support other joint specification schemes such as a
4415 // custom checkbox in the viewer GUI. 4431 // custom checkbox in the viewer GUI.
4416 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4432 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4417 { 4433 {
4418 return IsHingeJoint() || IsBallJoint(); 4434 return IsHingeJoint() || IsBallJoint();
4419 } 4435 }
@@ -4534,7 +4550,6 @@ namespace OpenSim.Region.Framework.Scenes
4534 } 4550 }
4535 */ 4551 */
4536 } 4552 }
4537
4538 else // it already has a physical representation 4553 else // it already has a physical representation
4539 { 4554 {
4540 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. 4555 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status.
@@ -5011,8 +5026,9 @@ namespace OpenSim.Region.Framework.Scenes
5011 if (ParentGroup.IsDeleted) 5026 if (ParentGroup.IsDeleted)
5012 return; 5027 return;
5013 5028
5014 if (ParentGroup.IsAttachment && ((ParentGroup.RootPart != this) || 5029 if (ParentGroup.IsAttachment
5015 ((ParentGroup.AttachedAvatar != remoteClient.AgentId) && (ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38)))) 5030 && (ParentGroup.RootPart != this
5031 || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint))
5016 return; 5032 return;
5017 5033
5018 // Causes this thread to dig into the Client Thread Data. 5034 // Causes this thread to dig into the Client Thread Data.