Index: OpenMetaverse/ObjectManager.cs =================================================================== --- OpenMetaverse/ObjectManager.cs (revision 2552) +++ OpenMetaverse/ObjectManager.cs (working copy) @@ -601,6 +601,7 @@ Client.Network.SendPacket(degrab, simulator); } + /// /// Create, or "rez" a new prim object in a simulator /// @@ -620,6 +621,29 @@ 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 + /// PrimFlags used in creation such as PrimFlags.CreateSelected + /// 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(); packet.AgentData.AgentID = Client.Self.AgentID; @@ -627,7 +651,7 @@ 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;