aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-17 05:37:24 +0000
committerMelanie Thielker2008-11-17 05:37:24 +0000
commit3f4aeccca30dffc51603be0e373968f9b8f23037 (patch)
tree0831479eebeaa60bb73bbba65f007731c5e55f86
parentMake the messageing server re-register with all it's user servers every five (diff)
downloadopensim-SC_OLD-3f4aeccca30dffc51603be0e373968f9b8f23037.zip
opensim-SC_OLD-3f4aeccca30dffc51603be0e373968f9b8f23037.tar.gz
opensim-SC_OLD-3f4aeccca30dffc51603be0e373968f9b8f23037.tar.bz2
opensim-SC_OLD-3f4aeccca30dffc51603be0e373968f9b8f23037.tar.xz
Try to fix login crash
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index daf1b5e..a7eb0b7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -424,12 +424,15 @@ namespace OpenSim.Region.Environment.Scenes
424 m_groupPosition.Y = PhysActor.Position.Y; 424 m_groupPosition.Y = PhysActor.Position.Y;
425 m_groupPosition.Z = PhysActor.Position.Z; 425 m_groupPosition.Z = PhysActor.Position.Z;
426 } 426 }
427 if (ParentGroup != null && ParentGroup.RootPart != null && ParentGroup.RootPart.IsAttachment) 427 if (IsAttachment)
428 { 428 {
429 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.RootPart.AttachedAvatar); 429 if (m_parentGroup != null && m_parentGroup.RootPart != null)
430 if (sp != null)
431 { 430 {
432 return sp.AbsolutePosition; 431 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(m_parentGroup.RootPart.AttachedAvatar);
432 if (sp != null)
433 {
434 return sp.AbsolutePosition;
435 }
433 } 436 }
434 } 437 }
435 438
@@ -743,7 +746,7 @@ if (m_shape != null) {
743 public Vector3 AbsolutePosition 746 public Vector3 AbsolutePosition
744 { 747 {
745 get { 748 get {
746 if (ParentGroup != null && ParentGroup.RootPart != null && ParentGroup.RootPart.IsAttachment) 749 if (IsAttachment)
747 return GroupPosition; 750 return GroupPosition;
748 751
749 return m_offsetPosition + m_groupPosition; } 752 return m_offsetPosition + m_groupPosition; }