Make newly created prims be the correct group
parent
ece27a3631
commit
2b8915d679
|
@ -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);
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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<uint> children)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue