diff options
author | Melanie | 2011-10-11 21:21:44 +0100 |
---|---|---|
committer | Melanie | 2011-10-11 21:21:44 +0100 |
commit | cc1fe354d01f68add960944ea9ac3cd2feba4c7d (patch) | |
tree | e56f163d2ced85420137a811701c153c43f6a5e3 /OpenSim/Region/Framework | |
parent | Merge commit 'a4cc5f628f053ad1f9f849addf79551cd58e9337' into bigmerge (diff) | |
parent | refactor: rename SOG/SOP.GetProperties() to SendPropertiesToClient() to refle... (diff) | |
download | opensim-SC-cc1fe354d01f68add960944ea9ac3cd2feba4c7d.zip opensim-SC-cc1fe354d01f68add960944ea9ac3cd2feba4c7d.tar.gz opensim-SC-cc1fe354d01f68add960944ea9ac3cd2feba4c7d.tar.bz2 opensim-SC-cc1fe354d01f68add960944ea9ac3cd2feba4c7d.tar.xz |
Merge commit 'de19dc3024e5359f594d0a32c593d905163c24ea' into bigmerge
Conflicts:
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
Diffstat (limited to '')
5 files changed, 49 insertions, 39 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index c2ec5d0..931fedc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -261,7 +261,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
261 | item.AssetID = asset.FullID; | 261 | item.AssetID = asset.FullID; |
262 | group.UpdateInventoryItem(item); | 262 | group.UpdateInventoryItem(item); |
263 | 263 | ||
264 | part.GetProperties(remoteClient); | 264 | part.SendPropertiesToClient(remoteClient); |
265 | 265 | ||
266 | // Trigger rerunning of script (use TriggerRezScript event, see RezScript) | 266 | // Trigger rerunning of script (use TriggerRezScript event, see RezScript) |
267 | ArrayList errors = new ArrayList(); | 267 | ArrayList errors = new ArrayList(); |
@@ -1005,7 +1005,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1005 | } | 1005 | } |
1006 | 1006 | ||
1007 | group.RemoveInventoryItem(localID, itemID); | 1007 | group.RemoveInventoryItem(localID, itemID); |
1008 | part.GetProperties(remoteClient); | 1008 | part.SendPropertiesToClient(remoteClient); |
1009 | } | 1009 | } |
1010 | } | 1010 | } |
1011 | 1011 | ||
@@ -1283,7 +1283,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1283 | 1283 | ||
1284 | if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) | 1284 | if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) |
1285 | { | 1285 | { |
1286 | destPart.GetProperties(avatar.ControllingClient); | 1286 | destPart.SendPropertiesToClient(avatar.ControllingClient); |
1287 | } | 1287 | } |
1288 | } | 1288 | } |
1289 | 1289 | ||
@@ -1446,7 +1446,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1446 | m_log.InfoFormat( | 1446 | m_log.InfoFormat( |
1447 | "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", | 1447 | "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", |
1448 | item.Name, primLocalID, remoteClient.Name); | 1448 | item.Name, primLocalID, remoteClient.Name); |
1449 | part.GetProperties(remoteClient); | 1449 | part.SendPropertiesToClient(remoteClient); |
1450 | if (!Permissions.BypassPermissions()) | 1450 | if (!Permissions.BypassPermissions()) |
1451 | { | 1451 | { |
1452 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 1452 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
@@ -1534,7 +1534,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1534 | 1534 | ||
1535 | if (part.Inventory.UpdateInventoryItem(itemInfo)) | 1535 | if (part.Inventory.UpdateInventoryItem(itemInfo)) |
1536 | { | 1536 | { |
1537 | part.GetProperties(remoteClient); | 1537 | part.SendPropertiesToClient(remoteClient); |
1538 | } | 1538 | } |
1539 | } | 1539 | } |
1540 | } | 1540 | } |
@@ -1586,7 +1586,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1586 | // m_log.InfoFormat("[PRIMINVENTORY]: " + | 1586 | // m_log.InfoFormat("[PRIMINVENTORY]: " + |
1587 | // "Rezzed script {0} into prim local ID {1} for user {2}", | 1587 | // "Rezzed script {0} into prim local ID {1} for user {2}", |
1588 | // item.inventoryName, localID, remoteClient.Name); | 1588 | // item.inventoryName, localID, remoteClient.Name); |
1589 | part.GetProperties(remoteClient); | 1589 | part.SendPropertiesToClient(remoteClient); |
1590 | part.ParentGroup.ResumeScripts(); | 1590 | part.ParentGroup.ResumeScripts(); |
1591 | } | 1591 | } |
1592 | else | 1592 | else |
@@ -1644,7 +1644,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1644 | taskItem.AssetID = asset.FullID; | 1644 | taskItem.AssetID = asset.FullID; |
1645 | 1645 | ||
1646 | part.Inventory.AddInventoryItem(taskItem, false); | 1646 | part.Inventory.AddInventoryItem(taskItem, false); |
1647 | part.GetProperties(remoteClient); | 1647 | part.SendPropertiesToClient(remoteClient); |
1648 | 1648 | ||
1649 | part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); | 1649 | part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); |
1650 | part.ParentGroup.ResumeScripts(); | 1650 | part.ParentGroup.ResumeScripts(); |
@@ -1758,7 +1758,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1758 | 1758 | ||
1759 | if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) | 1759 | if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) |
1760 | { | 1760 | { |
1761 | destPart.GetProperties(avatar.ControllingClient); | 1761 | destPart.SendPropertiesToClient(avatar.ControllingClient); |
1762 | } | 1762 | } |
1763 | } | 1763 | } |
1764 | 1764 | ||
@@ -2217,7 +2217,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2217 | SceneObjectPart part = GetSceneObjectPart(localID); | 2217 | SceneObjectPart part = GetSceneObjectPart(localID); |
2218 | if (part == null) | 2218 | if (part == null) |
2219 | continue; | 2219 | continue; |
2220 | part.GetProperties(remoteClient); | 2220 | part.SendPropertiesToClient(remoteClient); |
2221 | } | 2221 | } |
2222 | } | 2222 | } |
2223 | 2223 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 9da57a8..575079f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
144 | { | 144 | { |
145 | if (((SceneObjectGroup) ent).LocalId == primLocalID) | 145 | if (((SceneObjectGroup) ent).LocalId == primLocalID) |
146 | { | 146 | { |
147 | ((SceneObjectGroup) ent).GetProperties(remoteClient); | 147 | ((SceneObjectGroup) ent).SendPropertiesToClient(remoteClient); |
148 | ((SceneObjectGroup) ent).IsSelected = true; | 148 | ((SceneObjectGroup) ent).IsSelected = true; |
149 | // A prim is only tainted if it's allowed to be edited by the person clicking it. | 149 | // A prim is only tainted if it's allowed to be edited by the person clicking it. |
150 | if (Permissions.CanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId) | 150 | if (Permissions.CanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId) |
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
167 | { | 167 | { |
168 | if (part.LocalId == primLocalID) | 168 | if (part.LocalId == primLocalID) |
169 | { | 169 | { |
170 | part.GetProperties(remoteClient); | 170 | part.SendPropertiesToClient(remoteClient); |
171 | foundPrim = true; | 171 | foundPrim = true; |
172 | break; | 172 | break; |
173 | } | 173 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index ea6aab0..5e9cb32 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2104,8 +2104,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2104 | 2104 | ||
2105 | #endregion | 2105 | #endregion |
2106 | 2106 | ||
2107 | #region Scheduling | ||
2108 | |||
2109 | public override void Update() | 2107 | public override void Update() |
2110 | { | 2108 | { |
2111 | // Check that the group was not deleted before the scheduled update | 2109 | // Check that the group was not deleted before the scheduled update |
@@ -2256,7 +2254,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2256 | parts[i].SendTerseUpdateToAllClients(); | 2254 | parts[i].SendTerseUpdateToAllClients(); |
2257 | } | 2255 | } |
2258 | 2256 | ||
2259 | #endregion | 2257 | /// <summary> |
2258 | /// Send metadata about the root prim (name, description, sale price, etc.) to a client. | ||
2259 | /// </summary> | ||
2260 | /// <param name="client"></param> | ||
2261 | public void SendPropertiesToClient(IClientAPI client) | ||
2262 | { | ||
2263 | m_rootPart.SendPropertiesToClient(client); | ||
2264 | } | ||
2260 | 2265 | ||
2261 | #region SceneGroupPart Methods | 2266 | #region SceneGroupPart Methods |
2262 | 2267 | ||
@@ -2751,15 +2756,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2751 | } | 2756 | } |
2752 | 2757 | ||
2753 | /// <summary> | 2758 | /// <summary> |
2754 | /// Return metadata about a prim (name, description, sale price, etc.) | ||
2755 | /// </summary> | ||
2756 | /// <param name="client"></param> | ||
2757 | public void GetProperties(IClientAPI client) | ||
2758 | { | ||
2759 | m_rootPart.GetProperties(client); | ||
2760 | } | ||
2761 | |||
2762 | /// <summary> | ||
2763 | /// Set the name of a prim | 2759 | /// Set the name of a prim |
2764 | /// </summary> | 2760 | /// </summary> |
2765 | /// <param name="name"></param> | 2761 | /// <param name="name"></param> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0c3b404..5414693 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1357,8 +1357,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1357 | 1357 | ||
1358 | #endregion Public Properties with only Get | 1358 | #endregion Public Properties with only Get |
1359 | 1359 | ||
1360 | #region Private Methods | ||
1361 | |||
1362 | private uint ApplyMask(uint val, bool set, uint mask) | 1360 | private uint ApplyMask(uint val, bool set, uint mask) |
1363 | { | 1361 | { |
1364 | if (set) | 1362 | if (set) |
@@ -1371,14 +1369,35 @@ namespace OpenSim.Region.Framework.Scenes | |||
1371 | } | 1369 | } |
1372 | } | 1370 | } |
1373 | 1371 | ||
1374 | private void SendObjectPropertiesToClient(UUID AgentID) | 1372 | /// <summary> |
1373 | /// Clear all pending updates of parts to clients | ||
1374 | /// </summary> | ||
1375 | private void ClearUpdateSchedule() | ||
1376 | { | ||
1377 | m_updateFlag = 0; | ||
1378 | } | ||
1379 | |||
1380 | /// <summary> | ||
1381 | /// Send this part's properties (name, description, inventory serial, base mask, etc.) to a client | ||
1382 | /// </summary> | ||
1383 | /// <param name="client"></param> | ||
1384 | public void SendPropertiesToClient(IClientAPI client) | ||
1385 | { | ||
1386 | client.SendObjectPropertiesReply(this); | ||
1387 | } | ||
1388 | |||
1389 | /// <summary> | ||
1390 | /// For the scene object group to which this part belongs, send that scene object's root part properties to a client. | ||
1391 | /// </summary> | ||
1392 | /// <param name="AgentID"></param> | ||
1393 | private void SendRootPartPropertiesToClient(UUID AgentID) | ||
1375 | { | 1394 | { |
1376 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 1395 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) |
1377 | { | 1396 | { |
1378 | // Ugly reference :( | 1397 | // Ugly reference :( |
1379 | if (avatar.UUID == AgentID) | 1398 | if (avatar.UUID == AgentID) |
1380 | { | 1399 | { |
1381 | m_parentGroup.GetProperties(avatar.ControllingClient); | 1400 | m_parentGroup.SendPropertiesToClient(avatar.ControllingClient); |
1382 | } | 1401 | } |
1383 | }); | 1402 | }); |
1384 | } | 1403 | } |
@@ -1407,8 +1426,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1407 | // } | 1426 | // } |
1408 | // } | 1427 | // } |
1409 | 1428 | ||
1410 | #endregion Private Methods | ||
1411 | |||
1412 | #region Public Methods | 1429 | #region Public Methods |
1413 | 1430 | ||
1414 | public void ResetExpire() | 1431 | public void ResetExpire() |
@@ -2077,11 +2094,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2077 | return Vector3.Zero; | 2094 | return Vector3.Zero; |
2078 | } | 2095 | } |
2079 | 2096 | ||
2080 | public void GetProperties(IClientAPI client) | ||
2081 | { | ||
2082 | client.SendObjectPropertiesReply(this); | ||
2083 | } | ||
2084 | |||
2085 | /// <summary> | 2097 | /// <summary> |
2086 | /// Method for a prim to get it's world position from the group. | 2098 | /// Method for a prim to get it's world position from the group. |
2087 | /// </summary> | 2099 | /// </summary> |
@@ -3500,7 +3512,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3500 | { | 3512 | { |
3501 | _groupID = groupID; | 3513 | _groupID = groupID; |
3502 | if (client != null) | 3514 | if (client != null) |
3503 | GetProperties(client); | 3515 | SendPropertiesToClient(client); |
3504 | m_updateFlag = 2; | 3516 | m_updateFlag = 2; |
3505 | } | 3517 | } |
3506 | 3518 | ||
@@ -4320,10 +4332,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4320 | 4332 | ||
4321 | break; | 4333 | break; |
4322 | } | 4334 | } |
4323 | SendFullUpdateToAllClients(); | ||
4324 | 4335 | ||
4325 | SendObjectPropertiesToClient(AgentID); | 4336 | SendFullUpdateToAllClients(); |
4326 | 4337 | ||
4338 | SendRootPartPropertiesToClient(AgentID); | ||
4327 | } | 4339 | } |
4328 | } | 4340 | } |
4329 | 4341 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 58ca00c..4edc220 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -1107,10 +1107,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1107 | if (m_inventoryFileData.Length > 2) | 1107 | if (m_inventoryFileData.Length > 2) |
1108 | { | 1108 | { |
1109 | xferManager.AddNewFile(m_inventoryFileName, m_inventoryFileData); | 1109 | xferManager.AddNewFile(m_inventoryFileName, m_inventoryFileData); |
1110 | client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial, | ||
1111 | Util.StringToBytes256(m_inventoryFileName)); | ||
1112 | return; | ||
1110 | } | 1113 | } |
1111 | 1114 | ||
1112 | client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial, | 1115 | client.SendTaskInventory(m_part.UUID, 0, new byte[0]); |
1113 | Util.StringToBytes256(m_inventoryFileName)); | ||
1114 | } | 1116 | } |
1115 | 1117 | ||
1116 | /// <summary> | 1118 | /// <summary> |