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:
MW
2007-04-03 16:10:00 +00:00
parent 56e6587c9f
commit ba2c94721c
2 changed files with 33 additions and 3 deletions

View File

@@ -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();