From bcf74416a1677584c069e4e0b9acf9015d8c5b6c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 19 Jul 2008 04:05:34 +0000 Subject: Fix prim link numbers (Mantis #1781) Implements additional unlink modes (unlink root prim from link set, some multi-set operations). Linking (single and mutiple) fully implemented. Consistent numbering of links while in world. Link/delink with predictable link numbering. Correct link numbers in LSL. Not all multi-set ops implemented. Link numbers still change when taken and re-rezzed. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index decd2d0..c3255b1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2487,7 +2487,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_host.ParentGroup.Children.Count > 1) { - return m_host.LinkNum + 1; + return m_host.LinkNum; } else { @@ -2923,7 +2923,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api object[] resobj = new object[] { - new LSL_Types.LSLInteger(m_host.LinkNum + 1), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) + new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) }; m_ScriptEngine.PostScriptEvent(partItemID, @@ -2947,7 +2947,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api partItemID = item.ItemID; Object[] resobj = new object[] { - new LSL_Types.LSLInteger(m_host.LinkNum + 1), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) + new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) }; m_ScriptEngine.PostScriptEvent(partItemID, @@ -2975,7 +2975,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api partItemID = item.ItemID; Object[] resobj = new object[] { - new LSL_Types.LSLInteger(m_host.LinkNum + 1), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) + new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) }; m_ScriptEngine.PostScriptEvent(partItemID, @@ -3005,7 +3005,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api partItemID = item.ItemID; Object[] resobj = new object[] { - new LSL_Types.LSLInteger(m_host.LinkNum + 1), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) + new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) }; m_ScriptEngine.PostScriptEvent(partItemID, @@ -3029,7 +3029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api object[] resobj = new object[] { - new LSL_Types.LSLInteger(m_host.LinkNum + 1), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) + new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) }; m_ScriptEngine.PostScriptEvent(partItemID, @@ -3045,7 +3045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api foreach (SceneObjectPart partInst in m_host.ParentGroup.GetParts()) { - if ((partInst.LinkNum + 1) == linknum) + if ((partInst.LinkNum) == linknum) { foreach (TaskInventoryItem item in partInst.TaskInventory.Values) @@ -3056,7 +3056,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api partItemID = item.ItemID; Object[] resObjDef = new object[] { - new LSL_Types.LSLInteger(m_host.LinkNum + 1), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) + new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) }; m_ScriptEngine.PostScriptEvent(partItemID, @@ -5046,7 +5046,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { foreach (SceneObjectPart partInst in m_host.ParentGroup.GetParts()) { - if ((partInst.LinkNum + 1) == linknumber) + if ((partInst.LinkNum) == linknumber) { part = partInst; break; -- cgit v1.1