mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
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.
This commit is contained in:
@@ -2600,7 +2600,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
if (m_host.ParentGroup.Children.Count > 1)
|
||||
{
|
||||
return m_host.LinkNum + 1;
|
||||
return m_host.LinkNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2979,7 +2979,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
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.m_EventQueueManager.AddToScriptQueue(
|
||||
@@ -3004,7 +3004,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
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.m_EventQueueManager.AddToScriptQueue(
|
||||
@@ -3032,7 +3032,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
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.m_EventQueueManager.AddToScriptQueue(
|
||||
@@ -3062,7 +3062,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
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.m_EventQueueManager.AddToScriptQueue(
|
||||
@@ -3086,7 +3086,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
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.m_EventQueueManager.AddToScriptQueue(
|
||||
@@ -3103,7 +3103,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
foreach (SceneObjectPart partInst in m_host.ParentGroup.GetParts())
|
||||
{
|
||||
|
||||
if ((partInst.LinkNum + 1) == linknum)
|
||||
if ((partInst.LinkNum) == linknum)
|
||||
{
|
||||
|
||||
foreach (TaskInventoryItem item in partInst.TaskInventory.Values)
|
||||
@@ -3114,7 +3114,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
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.m_EventQueueManager.AddToScriptQueue(
|
||||
@@ -5246,7 +5246,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
{
|
||||
foreach (SceneObjectPart partInst in m_host.ParentGroup.GetParts())
|
||||
{
|
||||
if ((partInst.LinkNum + 1) == linknumber)
|
||||
if ((partInst.LinkNum) == linknumber)
|
||||
{
|
||||
part = partInst;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user