diff options
author | Justin Clarke Casey | 2008-06-27 14:15:14 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-27 14:15:14 +0000 |
commit | c9b41bdc4ea33452e675a1d12244aab196fcde29 (patch) | |
tree | b10ff60ec398de243c54579d827f2e3a51495736 /OpenSim/Region/Environment/Scenes | |
parent | status: work in progress, non-functional (diff) | |
download | opensim-SC_OLD-c9b41bdc4ea33452e675a1d12244aab196fcde29.zip opensim-SC_OLD-c9b41bdc4ea33452e675a1d12244aab196fcde29.tar.gz opensim-SC_OLD-c9b41bdc4ea33452e675a1d12244aab196fcde29.tar.bz2 opensim-SC_OLD-c9b41bdc4ea33452e675a1d12244aab196fcde29.tar.xz |
* Add extra backup parameter to InnerScene.AddRestoredSceneObject()
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
4 files changed, 24 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 87c4226..c7068fa 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -192,7 +192,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
192 | /// Add an object into the scene that has come from storage | 192 | /// Add an object into the scene that has come from storage |
193 | /// </summary> | 193 | /// </summary> |
194 | /// <param name="sceneObject"></param> | 194 | /// <param name="sceneObject"></param> |
195 | protected internal void AddSceneObjectFromStorage(SceneObjectGroup sceneObject) | 195 | /// <param name="attachToBackup"> |
196 | /// If true, changes to the object will be reflected in its persisted data | ||
197 | /// If false, the persisted data will not be changed even if the object in the scene is changed | ||
198 | /// </param> | ||
199 | protected internal void AddRestoredSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | ||
196 | { | 200 | { |
197 | sceneObject.RegionHandle = m_regInfo.RegionHandle; | 201 | sceneObject.RegionHandle = m_regInfo.RegionHandle; |
198 | sceneObject.SetScene(m_parentScene); | 202 | sceneObject.SetScene(m_parentScene); |
@@ -204,7 +208,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
204 | 208 | ||
205 | sceneObject.UpdateParentIDs(); | 209 | sceneObject.UpdateParentIDs(); |
206 | 210 | ||
207 | AddSceneObject(sceneObject, true); | 211 | AddSceneObject(sceneObject, attachToBackup); |
208 | } | 212 | } |
209 | 213 | ||
210 | /// <summary> | 214 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index c7de419..ecb54e6 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1470,7 +1470,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1470 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID); | 1470 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID); |
1471 | foreach (SceneObjectGroup group in PrimsFromDB) | 1471 | foreach (SceneObjectGroup group in PrimsFromDB) |
1472 | { | 1472 | { |
1473 | AddSceneObjectFromStorage(group); | 1473 | AddRestoredSceneObject(group, true); |
1474 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 1474 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); |
1475 | rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; | 1475 | rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; |
1476 | rootPart.TrimPermissions(); | 1476 | rootPart.TrimPermissions(); |
@@ -1651,9 +1651,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1651 | /// Add an object into the scene that has come from storage | 1651 | /// Add an object into the scene that has come from storage |
1652 | /// </summary> | 1652 | /// </summary> |
1653 | /// <param name="sceneObject"></param> | 1653 | /// <param name="sceneObject"></param> |
1654 | public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject) | 1654 | public void AddRestoredSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) |
1655 | { | 1655 | { |
1656 | m_innerScene.AddSceneObjectFromStorage(sceneObject); | 1656 | m_innerScene.AddRestoredSceneObject(sceneObject, attachToBackup); |
1657 | } | 1657 | } |
1658 | 1658 | ||
1659 | /// <summary> | 1659 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index b8f52ec..5236014 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -94,6 +94,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
94 | /// since the group's last persistent backup | 94 | /// since the group's last persistent backup |
95 | /// </summary> | 95 | /// </summary> |
96 | public bool HasGroupChanged = false; | 96 | public bool HasGroupChanged = false; |
97 | |||
97 | public float scriptScore = 0f; | 98 | public float scriptScore = 0f; |
98 | 99 | ||
99 | private LLVector3 lastPhysGroupPos; | 100 | private LLVector3 lastPhysGroupPos; |
@@ -1530,7 +1531,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1530 | } | 1531 | } |
1531 | 1532 | ||
1532 | /// <summary> | 1533 | /// <summary> |
1533 | /// Schedule a full update for every part in this object | 1534 | /// Schedule a full update for this scene object |
1534 | /// </summary> | 1535 | /// </summary> |
1535 | public void ScheduleGroupForFullUpdate() | 1536 | public void ScheduleGroupForFullUpdate() |
1536 | { | 1537 | { |
@@ -1546,7 +1547,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1546 | } | 1547 | } |
1547 | 1548 | ||
1548 | /// <summary> | 1549 | /// <summary> |
1549 | /// | 1550 | /// Schedule a terse update for this scene object |
1550 | /// </summary> | 1551 | /// </summary> |
1551 | public void ScheduleGroupForTerseUpdate() | 1552 | public void ScheduleGroupForTerseUpdate() |
1552 | { | 1553 | { |
@@ -1562,7 +1563,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1562 | } | 1563 | } |
1563 | 1564 | ||
1564 | /// <summary> | 1565 | /// <summary> |
1565 | /// | 1566 | /// Immediately send a full update for this scene object. |
1566 | /// </summary> | 1567 | /// </summary> |
1567 | public void SendGroupFullUpdate() | 1568 | public void SendGroupFullUpdate() |
1568 | { | 1569 | { |
@@ -1583,7 +1584,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1583 | } | 1584 | } |
1584 | 1585 | ||
1585 | /// <summary> | 1586 | /// <summary> |
1586 | /// | 1587 | /// Immediately send a terse update for this scene object. |
1587 | /// </summary> | 1588 | /// </summary> |
1588 | public void SendGroupTerseUpdate() | 1589 | public void SendGroupTerseUpdate() |
1589 | { | 1590 | { |
@@ -2100,7 +2101,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2100 | #region Resize | 2101 | #region Resize |
2101 | 2102 | ||
2102 | /// <summary> | 2103 | /// <summary> |
2103 | /// | 2104 | /// Resize the given part |
2104 | /// </summary> | 2105 | /// </summary> |
2105 | /// <param name="scale"></param> | 2106 | /// <param name="scale"></param> |
2106 | /// <param name="localID"></param> | 2107 | /// <param name="localID"></param> |
@@ -2531,6 +2532,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2531 | } | 2532 | } |
2532 | } | 2533 | } |
2533 | } | 2534 | } |
2535 | |||
2536 | /// <summary> | ||
2537 | /// Set the user group to which this scene object belongs. | ||
2538 | /// </summary> | ||
2539 | /// <param name="GroupID"></param> | ||
2540 | /// <param name="client"></param> | ||
2534 | public void SetGroup(LLUUID GroupID, IClientAPI client) | 2541 | public void SetGroup(LLUUID GroupID, IClientAPI client) |
2535 | { | 2542 | { |
2536 | lock (m_parts) | 2543 | lock (m_parts) |
@@ -2540,6 +2547,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2540 | part.SetGroup(GroupID, client); | 2547 | part.SetGroup(GroupID, client); |
2541 | } | 2548 | } |
2542 | } | 2549 | } |
2550 | |||
2543 | ScheduleGroupForFullUpdate(); | 2551 | ScheduleGroupForFullUpdate(); |
2544 | } | 2552 | } |
2545 | } | 2553 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 6009206..85e098d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -3125,12 +3125,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
3125 | ParentGroup.RootPart.BaseMask); | 3125 | ParentGroup.RootPart.BaseMask); |
3126 | 3126 | ||
3127 | } | 3127 | } |
3128 | |||
3128 | public void SetGroup(LLUUID groupID, IClientAPI client) | 3129 | public void SetGroup(LLUUID groupID, IClientAPI client) |
3129 | { | 3130 | { |
3130 | GroupID = groupID; | 3131 | GroupID = groupID; |
3131 | GetProperties(client); | 3132 | GetProperties(client); |
3132 | m_updateFlag = 2; | 3133 | m_updateFlag = 2; |
3133 | } | 3134 | } |
3135 | |||
3134 | private void handleTimerAccounting(uint localID, double interval) | 3136 | private void handleTimerAccounting(uint localID, double interval) |
3135 | { | 3137 | { |
3136 | if (localID == LocalId) | 3138 | if (localID == LocalId) |