mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
more changes relative to incorrect use of activegroupid
This commit is contained in:
@@ -306,9 +306,21 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
///
|
||||
/// RezObject
|
||||
///
|
||||
public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
|
||||
UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
||||
bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
|
||||
// compatibility do not use
|
||||
public override SceneObjectGroup RezObject(
|
||||
IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
|
||||
UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
||||
bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
|
||||
{
|
||||
return RezObject(remoteClient, itemID, UUID.Zero, RayEnd, RayStart,
|
||||
RayTargetID, BypassRayCast, RayEndIsIntersection,
|
||||
RezSelected, RemoveItem, fromTaskID, attachment);
|
||||
}
|
||||
|
||||
public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID,
|
||||
UUID groupID, Vector3 RayEnd, Vector3 RayStart,
|
||||
UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
||||
bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
|
||||
{
|
||||
m_log.DebugFormat("[HGScene]: RezObject itemID={0} fromTaskID={1}", itemID, fromTaskID);
|
||||
|
||||
@@ -331,7 +343,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
//}
|
||||
|
||||
// OK, we're done fetching. Pass it up to the default RezObject
|
||||
SceneObjectGroup sog = base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
|
||||
SceneObjectGroup sog = base.RezObject(remoteClient, itemID, groupID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
|
||||
RezSelected, RemoveItem, fromTaskID, attachment);
|
||||
|
||||
return sog;
|
||||
|
||||
@@ -818,12 +818,22 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
// compatibility do not use
|
||||
public virtual SceneObjectGroup RezObject(
|
||||
IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
|
||||
UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
||||
bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
|
||||
{
|
||||
return RezObject(remoteClient, itemID, UUID.Zero, RayEnd, RayStart,
|
||||
RayTargetID, BypassRayCast, RayEndIsIntersection,
|
||||
RezSelected, RemoveItem, fromTaskID, attachment);
|
||||
}
|
||||
|
||||
public virtual SceneObjectGroup RezObject(
|
||||
IClientAPI remoteClient, UUID itemID, UUID rezGroupID, Vector3 RayEnd, Vector3 RayStart,
|
||||
UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
||||
bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
|
||||
{
|
||||
// m_log.DebugFormat("[INVENTORY ACCESS MODULE]: RezObject for {0}, item {1}", remoteClient.Name, itemID);
|
||||
InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID);
|
||||
|
||||
@@ -835,15 +845,27 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
item.Owner = remoteClient.AgentId;
|
||||
|
||||
return RezObject(
|
||||
remoteClient, item, item.AssetID,
|
||||
remoteClient, item, rezGroupID, item.AssetID,
|
||||
RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
|
||||
RezSelected, RemoveItem, fromTaskID, attachment);
|
||||
}
|
||||
|
||||
// compatility
|
||||
public virtual SceneObjectGroup RezObject(
|
||||
IClientAPI remoteClient, InventoryItemBase item, UUID assetID, Vector3 RayEnd, Vector3 RayStart,
|
||||
UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
|
||||
bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
|
||||
{
|
||||
return RezObject(remoteClient, item, UUID.Zero, assetID,
|
||||
RayEnd, RayStart, RayTargetID,
|
||||
BypassRayCast, RayEndIsIntersection,
|
||||
RezSelected, RemoveItem, fromTaskID, attachment);
|
||||
}
|
||||
|
||||
public virtual SceneObjectGroup RezObject(
|
||||
IClientAPI remoteClient, InventoryItemBase item, UUID groupID, UUID assetID,
|
||||
Vector3 RayEnd, Vector3 RayStart, UUID RayTargetID,
|
||||
byte BypassRayCast, bool RayEndIsIntersection,
|
||||
bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
|
||||
{
|
||||
AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString());
|
||||
|
||||
@@ -986,6 +1008,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
group.IsAttachment = true;
|
||||
}
|
||||
|
||||
group.SetGroup(groupID, remoteClient);
|
||||
|
||||
// If we're rezzing an attachment then don't ask
|
||||
// AddNewSceneObject() to update the client since
|
||||
// we'll be doing that later on. Scheduling more than
|
||||
@@ -995,12 +1019,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
m_Scene.AddNewSceneObject(group, true, false);
|
||||
|
||||
if (!attachment)
|
||||
{
|
||||
group.AbsolutePosition = pos + veclist[i];
|
||||
|
||||
group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
|
||||
|
||||
if (!attachment)
|
||||
{
|
||||
// Fire on_rez
|
||||
group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1);
|
||||
rootPart.ParentGroup.ResumeScripts();
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
|
||||
|
||||
SceneObjectGroup so
|
||||
= m_iam.RezObject(
|
||||
m_tc, item1Id, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
|
||||
m_tc, item1Id, UUID.Zero, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
|
||||
|
||||
Assert.That(so, Is.Not.Null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user