Added ScheduleFullUpdate() in SceneObjectPart.AddInventoryItem(), to enable synchronization across actors.
parent
9e08ede0bd
commit
c1e19ead74
|
@ -376,6 +376,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
SceneObjectPart part = GetSceneObjectPart(primID);
|
SceneObjectPart part = GetSceneObjectPart(primID);
|
||||||
SceneObjectGroup group = part.ParentGroup;
|
SceneObjectGroup group = part.ParentGroup;
|
||||||
|
|
||||||
|
if (null == group)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[PRIM INVENTORY]: " +
|
||||||
|
"Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist",
|
||||||
|
itemID, primID);
|
||||||
|
|
||||||
|
return new ArrayList();
|
||||||
|
}
|
||||||
|
|
||||||
if (isScriptRunning)
|
if (isScriptRunning)
|
||||||
{
|
{
|
||||||
m_log.Debug("To RemoveScriptInstance");
|
m_log.Debug("To RemoveScriptInstance");
|
||||||
|
@ -385,6 +396,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Retrieve item
|
// Retrieve item
|
||||||
TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemID);
|
TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemID);
|
||||||
|
|
||||||
|
if (null == item)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for caps script update "
|
||||||
|
+ " but the item does not exist in this inventory",
|
||||||
|
itemID, part.Name, part.UUID);
|
||||||
|
|
||||||
|
return new ArrayList();
|
||||||
|
}
|
||||||
|
|
||||||
// Update item with new asset
|
// Update item with new asset
|
||||||
item.AssetID = newAssetID;
|
item.AssetID = newAssetID;
|
||||||
group.UpdateInventoryItem(item);
|
group.UpdateInventoryItem(item);
|
||||||
|
|
|
@ -539,6 +539,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//m_inventorySerial += 2;
|
//m_inventorySerial += 2;
|
||||||
HasInventoryChanged = true;
|
HasInventoryChanged = true;
|
||||||
m_part.ParentGroup.HasGroupChanged = true;
|
m_part.ParentGroup.HasGroupChanged = true;
|
||||||
|
|
||||||
|
//SYMMETRIC SYNC: add ScheduleFullUpdate to enable synchronization across actors
|
||||||
|
m_part.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue