aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs46
1 files changed, 18 insertions, 28 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 04fef83..632ac8f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1305,8 +1305,6 @@ namespace OpenSim.Region.Framework.Scenes
1305 1305
1306 #endregion Public Properties with only Get 1306 #endregion Public Properties with only Get
1307 1307
1308 #region Private Methods
1309
1310 private uint ApplyMask(uint val, bool set, uint mask) 1308 private uint ApplyMask(uint val, bool set, uint mask)
1311 { 1309 {
1312 if (set) 1310 if (set)
@@ -1327,14 +1325,27 @@ namespace OpenSim.Region.Framework.Scenes
1327 m_updateFlag = 0; 1325 m_updateFlag = 0;
1328 } 1326 }
1329 1327
1330 private void SendObjectPropertiesToClient(UUID AgentID) 1328 /// <summary>
1329 /// Send this part's properties (name, description, inventory serial, base mask, etc.) to a client
1330 /// </summary>
1331 /// <param name="client"></param>
1332 public void SendPropertiesToClient(IClientAPI client)
1333 {
1334 client.SendObjectPropertiesReply(this);
1335 }
1336
1337 /// <summary>
1338 /// For the scene object group to which this part belongs, send that scene object's root part properties to a client.
1339 /// </summary>
1340 /// <param name="AgentID"></param>
1341 private void SendRootPartPropertiesToClient(UUID AgentID)
1331 { 1342 {
1332 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 1343 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
1333 { 1344 {
1334 // Ugly reference :( 1345 // Ugly reference :(
1335 if (avatar.UUID == AgentID) 1346 if (avatar.UUID == AgentID)
1336 { 1347 {
1337 m_parentGroup.GetProperties(avatar.ControllingClient); 1348 m_parentGroup.SendPropertiesToClient(avatar.ControllingClient);
1338 } 1349 }
1339 }); 1350 });
1340 } 1351 }
@@ -1363,8 +1374,6 @@ namespace OpenSim.Region.Framework.Scenes
1363 // } 1374 // }
1364 // } 1375 // }
1365 1376
1366 #endregion Private Methods
1367
1368 #region Public Methods 1377 #region Public Methods
1369 1378
1370 public void ResetExpire() 1379 public void ResetExpire()
@@ -1705,20 +1714,6 @@ namespace OpenSim.Region.Framework.Scenes
1705 Name, LocalId, id); 1714 Name, LocalId, id);
1706 } 1715 }
1707 1716
1708 public static SceneObjectPart Create()
1709 {
1710 SceneObjectPart part = new SceneObjectPart();
1711 part.UUID = UUID.Random();
1712
1713 PrimitiveBaseShape shape = PrimitiveBaseShape.Create();
1714 part.Shape = shape;
1715
1716 part.Name = "Primitive";
1717 part._ownerID = UUID.Random();
1718
1719 return part;
1720 }
1721
1722 /// <summary> 1717 /// <summary>
1723 /// Do a physics property update for a NINJA joint. 1718 /// Do a physics property update for a NINJA joint.
1724 /// </summary> 1719 /// </summary>
@@ -2030,11 +2025,6 @@ namespace OpenSim.Region.Framework.Scenes
2030 return Vector3.Zero; 2025 return Vector3.Zero;
2031 } 2026 }
2032 2027
2033 public void GetProperties(IClientAPI client)
2034 {
2035 client.SendObjectPropertiesReply(this);
2036 }
2037
2038 /// <summary> 2028 /// <summary>
2039 /// Method for a prim to get it's world position from the group. 2029 /// Method for a prim to get it's world position from the group.
2040 /// </summary> 2030 /// </summary>
@@ -3453,7 +3443,7 @@ namespace OpenSim.Region.Framework.Scenes
3453 { 3443 {
3454 _groupID = groupID; 3444 _groupID = groupID;
3455 if (client != null) 3445 if (client != null)
3456 GetProperties(client); 3446 SendPropertiesToClient(client);
3457 m_updateFlag = 2; 3447 m_updateFlag = 2;
3458 } 3448 }
3459 3449
@@ -4273,10 +4263,10 @@ namespace OpenSim.Region.Framework.Scenes
4273 4263
4274 break; 4264 break;
4275 } 4265 }
4276 SendFullUpdateToAllClients();
4277 4266
4278 SendObjectPropertiesToClient(AgentID); 4267 SendFullUpdateToAllClients();
4279 4268
4269 SendRootPartPropertiesToClient(AgentID);
4280 } 4270 }
4281 } 4271 }
4282 4272