diff options
author | MW | 2007-04-03 16:10:00 +0000 |
---|---|---|
committer | MW | 2007-04-03 16:10:00 +0000 |
commit | ba2c94721c2f3b9dc263ad6ca635aa8a9c521ba5 (patch) | |
tree | c8f650dc2492960b1fa234c751a1ac6f76ab650a /OpenSim.RegionServer/SimClient.cs | |
parent | Temporary fix for the object taking bug (diff) | |
download | opensim-SC-ba2c94721c2f3b9dc263ad6ca635aa8a9c521ba5.zip opensim-SC-ba2c94721c2f3b9dc263ad6ca635aa8a9c521ba5.tar.gz opensim-SC-ba2c94721c2f3b9dc263ad6ca635aa8a9c521ba5.tar.bz2 opensim-SC-ba2c94721c2f3b9dc263ad6ca635aa8a9c521ba5.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index ea70d02..58cc625 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -257,6 +257,31 @@ namespace OpenSim | |||
257 | break; | 257 | break; |
258 | case PacketType.ObjectLink: | 258 | case PacketType.ObjectLink: |
259 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); | 259 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); |
260 | ObjectLinkPacket link = (ObjectLinkPacket)Pack; | ||
261 | uint parentprimid = 0; | ||
262 | OpenSim.world.Primitive parentprim = null; | ||
263 | if (link.ObjectData.Length > 1) | ||
264 | { | ||
265 | parentprimid = link.ObjectData[0].ObjectLocalID; | ||
266 | foreach (Entity ent in m_world.Entities.Values) | ||
267 | { | ||
268 | if (ent.localid == parentprimid) | ||
269 | { | ||
270 | parentprim = (OpenSim.world.Primitive)ent; | ||
271 | |||
272 | } | ||
273 | } | ||
274 | for (int i = 1; i < link.ObjectData.Length; i++) | ||
275 | { | ||
276 | foreach (Entity ent in m_world.Entities.Values) | ||
277 | { | ||
278 | if (ent.localid == link.ObjectData[i].ObjectLocalID) | ||
279 | { | ||
280 | ((OpenSim.world.Primitive)ent).MakeParent(parentprim); | ||
281 | } | ||
282 | } | ||
283 | } | ||
284 | } | ||
260 | break; | 285 | break; |
261 | case PacketType.ObjectScale: | 286 | case PacketType.ObjectScale: |
262 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); | 287 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); |
@@ -555,8 +580,6 @@ namespace OpenSim | |||
555 | } | 580 | } |
556 | } | 581 | } |
557 | 582 | ||
558 | //MainConsole.Instance.WriteLine("OUT: \n" + Pack.ToString()); | ||
559 | |||
560 | byte[] ZeroOutBuffer = new byte[4096]; | 583 | byte[] ZeroOutBuffer = new byte[4096]; |
561 | byte[] sendbuffer; | 584 | byte[] sendbuffer; |
562 | sendbuffer = Pack.ToBytes(); | 585 | sendbuffer = Pack.ToBytes(); |