Committing the LCO database layer. Native MySQL, no ADO. New reconnect
mechanism to prevent prim loss. Preserve link order on sim restart and drag copy. Fix drag-copied prims' inventories. Fix persistence of child prim inventories.0.6.1-post-fixes
parent
3e42cca2c0
commit
3efdccbb12
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE prims ADD COLUMN LinkNumber integer not null default 0;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -329,6 +329,7 @@ namespace OpenSim.Framework
|
|||
{
|
||||
_itemID = UUID.Random();
|
||||
_parentPartID = partID;
|
||||
_parentID = partID;
|
||||
}
|
||||
|
||||
public TaskInventoryItem()
|
||||
|
|
|
@ -1336,6 +1336,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
|
||||
|
||||
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
|
||||
|
||||
if (userExposed)
|
||||
dupe.m_rootPart.TrimPermissions();
|
||||
|
||||
|
@ -1368,16 +1370,25 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
|
||||
partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2)
|
||||
{
|
||||
return p1.LinkNum.CompareTo(p2.LinkNum);
|
||||
}
|
||||
);
|
||||
|
||||
foreach (SceneObjectPart part in partList)
|
||||
{
|
||||
if (part.UUID != m_rootPart.UUID)
|
||||
{
|
||||
SceneObjectPart newPart =
|
||||
dupe.CopyPart(part, OwnerID, GroupID, userExposed);
|
||||
|
||||
newPart.LinkNum = part.LinkNum;
|
||||
|
||||
if (userExposed)
|
||||
{
|
||||
SetPartOwner(part, cAgentID, cGroupID);
|
||||
part.ScheduleFullUpdate();
|
||||
SetPartOwner(newPart, cAgentID, cGroupID);
|
||||
newPart.ScheduleFullUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1507,7 +1518,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <param name="part"></param>
|
||||
/// <param name="cAgentID"></param>
|
||||
/// <param name="cGroupID"></param>
|
||||
public void CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed)
|
||||
public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed)
|
||||
{
|
||||
SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed);
|
||||
newPart.SetParent(this);
|
||||
|
@ -1519,6 +1530,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
SetPartAsNonRoot(newPart);
|
||||
|
||||
return newPart;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1263,10 +1263,18 @@ if (m_shape != null) {
|
|||
dupe._category = _category;
|
||||
dupe.m_rezzed = m_rezzed;
|
||||
|
||||
dupe.m_inventory.Items = (TaskInventoryDictionary)dupe.m_inventory.Items.Clone();
|
||||
dupe.m_inventory = new SceneObjectPartInventory(dupe);
|
||||
dupe.m_inventory.Items = (TaskInventoryDictionary)m_inventory.Items.Clone();
|
||||
|
||||
if (userExposed)
|
||||
{
|
||||
dupe.ResetIDs(linkNum);
|
||||
dupe.m_inventory.HasInventoryChanged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
dupe.m_inventory.HasInventoryChanged = m_inventory.HasInventoryChanged;
|
||||
}
|
||||
|
||||
// Move afterwards ResetIDs as it clears the localID
|
||||
dupe.LocalId = localID;
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <summary>
|
||||
/// Tracks whether inventory has changed since the last persistent backup
|
||||
/// </summary>
|
||||
protected bool HasInventoryChanged;
|
||||
internal bool HasInventoryChanged;
|
||||
|
||||
/// <value>
|
||||
/// Inventory serial number
|
||||
|
@ -81,7 +81,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
protected internal TaskInventoryDictionary Items
|
||||
{
|
||||
get { return m_items; }
|
||||
set { m_items = value; }
|
||||
set
|
||||
{
|
||||
m_items = value;
|
||||
m_inventorySerial++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue