aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2008-11-20 00:13:15 +0000
committerSean Dague2008-11-20 00:13:15 +0000
commite6f92044caa8f66fd0a04019b9edcd30eb389920 (patch)
treeee7c5ca8013feeaf286e2fb33d6a60a567405ab1
parentMantis#2658. Thank you kindly, StrawberryFride for a patch that: (diff)
downloadopensim-SC-e6f92044caa8f66fd0a04019b9edcd30eb389920.zip
opensim-SC-e6f92044caa8f66fd0a04019b9edcd30eb389920.tar.gz
opensim-SC-e6f92044caa8f66fd0a04019b9edcd30eb389920.tar.bz2
opensim-SC-e6f92044caa8f66fd0a04019b9edcd30eb389920.tar.xz
From: Christopher Yeoh <cyeoh@au1.ibm.com>
Attached is a patch which fixes mantis bug 2645 where scripts in child prims freeze after being unlinked from the root prim. This got introduced some time after the 0.6 freeze. Have checked test suites pass even after nant clean ;-) http://opensimulator.org/mantis/bug_update_page.php?bug_id=2645 Also removes a redundant ResetIDs call Regards, Chris
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneGraph.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs4
3 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneGraph.cs b/OpenSim/Region/Environment/Scenes/SceneGraph.cs
index ab0ec1f..18fe151 100644
--- a/OpenSim/Region/Environment/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneGraph.cs
@@ -1669,7 +1669,6 @@ namespace OpenSim.Region.Environment.Scenes
1669 { 1669 {
1670 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID, true); 1670 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID, true);
1671 copy.AbsolutePosition = copy.AbsolutePosition + offset; 1671 copy.AbsolutePosition = copy.AbsolutePosition + offset;
1672 copy.ResetIDs();
1673 1672
1674 lock (Entities) 1673 lock (Entities)
1675 { 1674 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2d62d66..82ab4eb 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -591,17 +591,19 @@ namespace OpenSim.Region.Environment.Scenes
591 { 591 {
592 m_scene = scene; 592 m_scene = scene;
593 RegionHandle = m_scene.RegionInfo.RegionHandle; 593 RegionHandle = m_scene.RegionInfo.RegionHandle;
594 594
595 m_rootPart.ParentID = 0; 595 m_rootPart.ParentID = 0;
596 m_rootPart.LocalId = m_scene.AllocateLocalId(); 596 if (m_rootPart.LocalId==0)
597 m_rootPart.LocalId = m_scene.AllocateLocalId();
597 598
599
598 // No need to lock here since the object isn't yet in a scene 600 // No need to lock here since the object isn't yet in a scene
599 foreach (SceneObjectPart part in m_parts.Values) 601 foreach (SceneObjectPart part in m_parts.Values)
600 { 602 {
601 if (Object.ReferenceEquals(part, m_rootPart)) 603 if (Object.ReferenceEquals(part, m_rootPart))
602 continue; 604 continue;
603 605 if (part.LocalId==0)
604 part.LocalId = m_scene.AllocateLocalId(); 606 part.LocalId = m_scene.AllocateLocalId();
605 part.ParentID = m_rootPart.LocalId; 607 part.ParentID = m_rootPart.LocalId;
606 //m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID); 608 //m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID);
607 } 609 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index a626fa3..96ee169 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1223,7 +1223,6 @@ if (m_shape != null) {
1223 if (userExposed) 1223 if (userExposed)
1224 dupe.UUID = UUID.Random(); 1224 dupe.UUID = UUID.Random();
1225 1225
1226 dupe.LocalId = localID;
1227 dupe._ownerID = AgentID; 1226 dupe._ownerID = AgentID;
1228 dupe._groupID = GroupID; 1227 dupe._groupID = GroupID;
1229 dupe.GroupPosition = GroupPosition; 1228 dupe.GroupPosition = GroupPosition;
@@ -1245,6 +1244,8 @@ if (m_shape != null) {
1245 if (userExposed) 1244 if (userExposed)
1246 dupe.ResetIDs(linkNum); 1245 dupe.ResetIDs(linkNum);
1247 1246
1247 // Move afterwards ResetIDs as it clears the localID
1248 dupe.LocalId = localID;
1248 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. 1249 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
1249 dupe._lastOwnerID = ObjectOwner; 1250 dupe._lastOwnerID = ObjectOwner;
1250 1251
@@ -1927,6 +1928,7 @@ if (m_shape != null) {
1927 { 1928 {
1928 UUID = UUID.Random(); 1929 UUID = UUID.Random();
1929 LinkNum = linkNum; 1930 LinkNum = linkNum;
1931 LocalId = 0;
1930 1932
1931 ResetInventoryIDs(); 1933 ResetInventoryIDs();
1932 } 1934 }