From e2aac1a6d768e04150403c343f1fa82995a85708 Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Tue, 31 Mar 2009 19:23:27 +0000 Subject: [PATCH] LIBOMV-465 Adds overload to OpbjectManager AddPrim method to allow user specified flags during creation. Thanks Douglas R Miles for the patch git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2562 52acb1d6-8a22-11de-b505-999d5b087335 --- OpenMetaverse/ObjectManager.cs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/OpenMetaverse/ObjectManager.cs b/OpenMetaverse/ObjectManager.cs index e2a7c569..8b5c3318 100644 --- a/OpenMetaverse/ObjectManager.cs +++ b/OpenMetaverse/ObjectManager.cs @@ -601,7 +601,7 @@ namespace OpenMetaverse Client.Network.SendPacket(degrab, simulator); } - /// + /// /// Create, or "rez" a new prim object in a simulator /// /// A reference to the object to place the object in @@ -619,6 +619,29 @@ namespace OpenMetaverse /// extended primitive properties public void AddPrim(Simulator simulator, Primitive.ConstructionData prim, UUID groupID, Vector3 position, Vector3 scale, Quaternion rotation) + { + AddPrim(simulator, prim, groupID, position, scale, rotation, PrimFlags.CreateSelected); + } + + /// + /// Create, or "rez" a new prim object in a simulator + /// + /// A reference to the object to place the object in + /// Data describing the prim object to rez + /// Group ID that this prim will be set to, or UUID.Zero if you + /// do not want the object to be associated with a specific group + /// An approximation of the position at which to rez the prim + /// Scale vector to size this prim + /// Rotation quaternion to rotate this prim + /// Specify the + /// Due to the way client prim rezzing is done on the server, + /// the requested position for an object is only close to where the prim + /// actually ends up. If you desire exact placement you'll need to + /// follow up by moving the object after it has been created. This + /// function will not set textures, light and flexible data, or other + /// extended primitive properties + public void AddPrim(Simulator simulator, Primitive.ConstructionData prim, UUID groupID, Vector3 position, + Vector3 scale, Quaternion rotation, PrimFlags createFlags) { ObjectAddPacket packet = new ObjectAddPacket(); @@ -627,7 +650,7 @@ namespace OpenMetaverse packet.AgentData.GroupID = groupID; packet.ObjectData.State = prim.State; - packet.ObjectData.AddFlags = (uint)PrimFlags.CreateSelected; + packet.ObjectData.AddFlags = (uint)createFlags; packet.ObjectData.PCode = (byte)PCode.Prim; packet.ObjectData.Material = (byte)prim.Material;