Fixed the problem that notecard updating was not propagated -- now syned
across actors, bit viewers may not always get the correct update.dsg
parent
0be7f9d804
commit
a17f0a0ea1
|
@ -302,8 +302,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
get { return m_inventory; }
|
||||
}
|
||||
//protected SceneObjectPartInventory m_inventory;
|
||||
protected SceneObjectPartInventoryBase m_inventory;
|
||||
protected SceneObjectPartInventory m_inventory;
|
||||
//protected SceneObjectPartInventoryBase m_inventory;
|
||||
|
||||
|
||||
public bool Undoing;
|
||||
|
@ -405,7 +405,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Rezzed = DateTime.UtcNow;
|
||||
|
||||
//m_inventory = new SceneObjectPartInventory(this);
|
||||
m_inventory = new SceneObjectPartInventoryBase(this);
|
||||
//m_inventory = new SceneObjectPartInventoryBase(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -457,7 +457,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
//m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo());
|
||||
|
||||
//m_inventory = new SceneObjectPartInventory(this);
|
||||
m_inventory = new SceneObjectPartInventoryBase(this);
|
||||
//m_inventory = new SceneObjectPartInventoryBase(this);
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
|
@ -5056,6 +5056,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public SceneObjectPart()
|
||||
: base()
|
||||
{
|
||||
m_inventory = new SceneObjectPartInventory(this);
|
||||
}
|
||||
|
||||
public SceneObjectPart(
|
||||
|
@ -5063,6 +5064,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Quaternion rotationOffset, Vector3 offsetPosition)
|
||||
: base(ownerID, shape, groupPosition, rotationOffset, offsetPosition)
|
||||
{
|
||||
m_inventory = new SceneObjectPartInventory(this);
|
||||
}
|
||||
|
||||
private static string m_localActorID = "";
|
||||
|
@ -5176,6 +5178,35 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
#endregion SceneObjectPartSyncProperties categorization
|
||||
|
||||
/*
|
||||
#region overridden SOPBase members
|
||||
public new IEntityInventory Inventory
|
||||
{
|
||||
get { return m_inventory; }
|
||||
}
|
||||
protected new SceneObjectPartInventory m_inventory;
|
||||
|
||||
/// <value>
|
||||
/// Access should be via Inventory directly - this property temporarily remains for xml serialization purposes
|
||||
/// </value>
|
||||
public new uint InventorySerial
|
||||
{
|
||||
get { return m_inventory.Serial; }
|
||||
set { m_inventory.Serial = value; }
|
||||
}
|
||||
|
||||
/// <value>
|
||||
/// Access should be via Inventory directly - this property temporarily remains for xml serialization purposes
|
||||
/// </value>
|
||||
public new TaskInventoryDictionary TaskInventory
|
||||
{
|
||||
get { return m_inventory.Items; }
|
||||
set { m_inventory.Items = value; }
|
||||
}
|
||||
|
||||
#endregion //overridden SOPBase members
|
||||
*/
|
||||
|
||||
#region overridden SOPBase functions
|
||||
//Implementation of ScheduleFullUpdate and ScheduleTerseUpdate for Bucket
|
||||
//based synchronization
|
||||
|
@ -5218,6 +5249,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
base.ScheduleTerseUpdate(updatedProperties);
|
||||
}
|
||||
|
||||
public void ScheduleSyncUpdate(List<SceneObjectPartSyncProperties> updatedProperties)
|
||||
{
|
||||
if (updatedProperties != null && updatedProperties.Count > 0)
|
||||
{
|
||||
if (m_parentGroup != null && m_parentGroup.Scene != null && m_parentGroup.Scene.RegionSyncModule != null)
|
||||
{
|
||||
m_parentGroup.Scene.RegionSyncModule.ProcessAndEnqueuePrimUpdatesByLocal(this, updatedProperties);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion overridden SOPBase functions
|
||||
|
||||
#region DSG SYNC supporting functions
|
||||
|
|
|
@ -41,8 +41,8 @@ using OpenSim.Region.Framework.Scenes.Serialization;
|
|||
|
||||
namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
//public class SceneObjectPartInventory : IEntityInventory
|
||||
public class SceneObjectPartInventoryBase : IEntityInventory
|
||||
public class SceneObjectPartInventory : IEntityInventory
|
||||
//public class SceneObjectPartInventoryBase : IEntityInventory
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -53,8 +53,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <value>
|
||||
/// The part to which the inventory belongs.
|
||||
/// </value>
|
||||
//private SceneObjectPart m_part;
|
||||
private SceneObjectPartBase m_part;
|
||||
private SceneObjectPart m_part;
|
||||
//private SceneObjectPartBase m_part;
|
||||
|
||||
/// <summary>
|
||||
/// Serial count for inventory file , used to tell if inventory has changed
|
||||
|
@ -100,8 +100,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="part">
|
||||
/// A <see cref="SceneObjectPart"/>
|
||||
/// </param>
|
||||
//public SceneObjectPartInventory(SceneObjectPart part)
|
||||
public SceneObjectPartInventoryBase(SceneObjectPartBase part)
|
||||
public SceneObjectPartInventory(SceneObjectPart part)
|
||||
//public SceneObjectPartInventoryBase(SceneObjectPartBase part)
|
||||
{
|
||||
m_part = part;
|
||||
}
|
||||
|
@ -695,7 +695,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return UpdateInventoryItem(item, fireScriptEvents, true);
|
||||
}
|
||||
|
||||
public bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents, bool considerChanged)
|
||||
//public bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents, bool considerChanged)
|
||||
public virtual bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents, bool considerChanged)
|
||||
{
|
||||
TaskInventoryItem it = GetInventoryItem(item.ItemID);
|
||||
if (it != null)
|
||||
|
@ -1183,6 +1184,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
#endregion REGION SYNC
|
||||
}
|
||||
|
||||
/*
|
||||
#region DSG SYNC
|
||||
public class SceneObjectPartInventory : SceneObjectPartInventoryBase
|
||||
{
|
||||
|
@ -1200,6 +1202,19 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
base.Serial = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents, bool considerChanged)
|
||||
{
|
||||
if (base.UpdateInventoryItem(item, fireScriptEvents, considerChanged))
|
||||
{
|
||||
m_part.ScheduleSyncUpdate(new List<SceneObjectPartSyncProperties>() { SceneObjectPartSyncProperties.TaskInventory, SceneObjectPartSyncProperties.InventorySerial });
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
* */
|
||||
}
|
||||
|
|
|
@ -5415,7 +5415,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
m_host.Name = name!=null?name:String.Empty;
|
||||
|
||||
//DSG SYNC
|
||||
m_host.ScheduleFullUpdate(new List<SceneObjectPartSyncProperties>() { SceneObjectPartSyncProperties.Name });
|
||||
//m_host.ScheduleFullUpdate(new List<SceneObjectPartSyncProperties>() { SceneObjectPartSyncProperties.Name });
|
||||
m_host.ScheduleSyncUpdate(new List<SceneObjectPartSyncProperties>() { SceneObjectPartSyncProperties.Name });
|
||||
}
|
||||
|
||||
public LSL_String llGetDate()
|
||||
|
|
Loading…
Reference in New Issue