From 2b8915d679c9d17989572dde9f6040338c508a12 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 17 Nov 2008 23:43:46 +0000 Subject: [PATCH] Make newly created prims be the correct group --- OpenSim/Framework/IClientAPI.cs | 2 +- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 2 +- OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | 2 +- .../Modules/ContentManagementSystem/CMController.cs | 2 +- .../World/TreePopulator/TreePopulatorModule.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 11 ++++++----- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index cf6a54165e..6d69c3daf4 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -198,7 +198,7 @@ namespace OpenSim.Framework public delegate void UUIDNameRequest(UUID id, IClientAPI remote_client); public delegate void AddNewPrim( - UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart, + UUID ownerID, UUID groupID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart, UUID RayTargetID, byte RayEndIsIntersection); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 4a4dcd87f2..b9bc88807e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4515,7 +4515,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP handlerAddPrim = OnAddPrim; if (handlerAddPrim != null) - handlerAddPrim(AgentId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); + handlerAddPrim(AgentId, ActiveGroupId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); } break; case PacketType.ObjectShape: diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index 12e0f0fc24..f03270464c 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs @@ -61,7 +61,7 @@ namespace OpenSim.Region.DataSnapshot.Providers //Detect object data changes by hooking into the IClientAPI. //Very dirty, and breaks whenever someone changes the client API. - client.OnAddPrim += delegate (UUID ownerID, Vector3 RayEnd, Quaternion rot, + client.OnAddPrim += delegate (UUID ownerID, UUID groupID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart, UUID RayTargetID, byte RayEndIsIntersection) { this.Stale = true; }; client.OnLinkObjects += delegate (IClientAPI remoteClient, uint parent, List children) diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs index 02c4ab0bb2..dfca655285 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs @@ -468,7 +468,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_log.Debug("[CONTENT MANAGEMENT]scale"); } - protected void UpdateNewParts(UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, + protected void UpdateNewParts(UUID ownerID, UUID groupID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart, UUID RayTargetID, byte RayEndIsIntersection) { diff --git a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs index b6879b044c..990d36ea4e 100644 --- a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs @@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator position.Z = (float) m_scene.Heightmap[(int) position.X, (int) position.Y]; SceneObjectGroup tree = - m_scene.AddTree(uuid, new Vector3(0.1f, 0.1f, 0.1f), + m_scene.AddTree(uuid, UUID.Zero, new Vector3(0.1f, 0.1f, 0.1f), Quaternion.Identity, position, Tree.Cypress1, diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index cf743de458..2287f994ee 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1738,7 +1738,7 @@ namespace OpenSim.Region.Environment.Scenes } } - public virtual void AddNewPrim(UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, + public virtual void AddNewPrim(UUID ownerID, UUID groupID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart, UUID RayTargetID, byte RayEndIsIntersection) { @@ -1749,11 +1749,11 @@ namespace OpenSim.Region.Environment.Scenes // rez ON the ground, not IN the ground pos.Z += 0.25F; - AddNewPrim(ownerID, pos, rot, shape); + AddNewPrim(ownerID, groupID, pos, rot, shape); } } - public virtual SceneObjectGroup AddNewPrim(UUID ownerID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) + public virtual SceneObjectGroup AddNewPrim(UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) { //m_log.DebugFormat( // "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName); @@ -1772,6 +1772,7 @@ namespace OpenSim.Region.Environment.Scenes AdaptTree(ref shape); } + sceneObject.SetGroup(groupID, null); AddNewSceneObject(sceneObject, true); return sceneObject; @@ -1797,7 +1798,7 @@ namespace OpenSim.Region.Environment.Scenes } } - public SceneObjectGroup AddTree(UUID uuid, Vector3 scale, Quaternion rotation, Vector3 position, + public SceneObjectGroup AddTree(UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree) { PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); @@ -1806,7 +1807,7 @@ namespace OpenSim.Region.Environment.Scenes treeShape.PCode = newTree ? (byte)PCode.NewTree : (byte)PCode.Tree; treeShape.Scale = scale; treeShape.State = (byte)treeType; - return AddNewPrim(uuid, position, rotation, treeShape); + return AddNewPrim(uuid, groupID, position, rotation, treeShape); } ///