mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Limited (hacked) object linking. Note: once you have linked a set of prims together (in one go), then don't try to link anymore prims to those objects.
This commit is contained in:
@@ -257,6 +257,31 @@ namespace OpenSim
|
||||
break;
|
||||
case PacketType.ObjectLink:
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString());
|
||||
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
|
||||
uint parentprimid = 0;
|
||||
OpenSim.world.Primitive parentprim = null;
|
||||
if (link.ObjectData.Length > 1)
|
||||
{
|
||||
parentprimid = link.ObjectData[0].ObjectLocalID;
|
||||
foreach (Entity ent in m_world.Entities.Values)
|
||||
{
|
||||
if (ent.localid == parentprimid)
|
||||
{
|
||||
parentprim = (OpenSim.world.Primitive)ent;
|
||||
|
||||
}
|
||||
}
|
||||
for (int i = 1; i < link.ObjectData.Length; i++)
|
||||
{
|
||||
foreach (Entity ent in m_world.Entities.Values)
|
||||
{
|
||||
if (ent.localid == link.ObjectData[i].ObjectLocalID)
|
||||
{
|
||||
((OpenSim.world.Primitive)ent).MakeParent(parentprim);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PacketType.ObjectScale:
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString());
|
||||
@@ -555,8 +580,6 @@ namespace OpenSim
|
||||
}
|
||||
}
|
||||
|
||||
//MainConsole.Instance.WriteLine("OUT: \n" + Pack.ToString());
|
||||
|
||||
byte[] ZeroOutBuffer = new byte[4096];
|
||||
byte[] sendbuffer;
|
||||
sendbuffer = Pack.ToBytes();
|
||||
|
||||
Reference in New Issue
Block a user