aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMelanie2011-10-12 00:10:15 +0200
committerMelanie2011-10-12 00:10:15 +0200
commit1c2b5d99c9601a3d301f4bc0f53389cca831ee04 (patch)
tree97fa9c758f429d5dee64234e442f2c83cd1b9994 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMerge branch 'careminster-presence-refactor' into bigmerge (diff)
parentMerge commit '92c88121c72386f85472c6cf4891eca8b62b9867' into bigmerge (diff)
downloadopensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.zip
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.gz
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.bz2
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.xz
Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs67
1 files changed, 33 insertions, 34 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 0c3b404..1a96f1b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -804,7 +804,7 @@ namespace OpenSim.Region.Framework.Scenes
804 if (av.LinkedPrim == m_uuid) 804 if (av.LinkedPrim == m_uuid)
805 { 805 {
806 Vector3 offset = (m_offsetPosition - oldpos); 806 Vector3 offset = (m_offsetPosition - oldpos);
807 av.OffsetPosition += offset; 807 av.AbsolutePosition += offset;
808 av.SendAvatarDataToAllAgents(); 808 av.SendAvatarDataToAllAgents();
809 } 809 }
810 } 810 }
@@ -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()
@@ -1752,20 +1769,6 @@ namespace OpenSim.Region.Framework.Scenes
1752 Name, LocalId, id); 1769 Name, LocalId, id);
1753 } 1770 }
1754 1771
1755 public static SceneObjectPart Create()
1756 {
1757 SceneObjectPart part = new SceneObjectPart();
1758 part.UUID = UUID.Random();
1759
1760 PrimitiveBaseShape shape = PrimitiveBaseShape.Create();
1761 part.Shape = shape;
1762
1763 part.Name = "Object";
1764 part._ownerID = UUID.Random();
1765
1766 return part;
1767 }
1768
1769 /// <summary> 1772 /// <summary>
1770 /// Do a physics property update for a NINJA joint. 1773 /// Do a physics property update for a NINJA joint.
1771 /// </summary> 1774 /// </summary>
@@ -2077,11 +2080,6 @@ namespace OpenSim.Region.Framework.Scenes
2077 return Vector3.Zero; 2080 return Vector3.Zero;
2078 } 2081 }
2079 2082
2080 public void GetProperties(IClientAPI client)
2081 {
2082 client.SendObjectPropertiesReply(this);
2083 }
2084
2085 /// <summary> 2083 /// <summary>
2086 /// Method for a prim to get it's world position from the group. 2084 /// Method for a prim to get it's world position from the group.
2087 /// </summary> 2085 /// </summary>
@@ -3055,6 +3053,10 @@ namespace OpenSim.Region.Framework.Scenes
3055 if (ParentGroup.IsDeleted) 3053 if (ParentGroup.IsDeleted)
3056 return; 3054 return;
3057 3055
3056 if (ParentGroup.IsAttachment && (ParentGroup.AttachedAvatar != remoteClient.AgentId) &&
3057 (ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))
3058 return;
3059
3058 clientFlags &= ~(uint) PrimFlags.CreateSelected; 3060 clientFlags &= ~(uint) PrimFlags.CreateSelected;
3059 3061
3060 if (remoteClient.AgentId == _ownerID) 3062 if (remoteClient.AgentId == _ownerID)
@@ -3500,7 +3502,7 @@ namespace OpenSim.Region.Framework.Scenes
3500 { 3502 {
3501 _groupID = groupID; 3503 _groupID = groupID;
3502 if (client != null) 3504 if (client != null)
3503 GetProperties(client); 3505 SendPropertiesToClient(client);
3504 m_updateFlag = 2; 3506 m_updateFlag = 2;
3505 } 3507 }
3506 3508
@@ -4242,10 +4244,6 @@ namespace OpenSim.Region.Framework.Scenes
4242 } 4244 }
4243 } 4245 }
4244 4246
4245 public virtual void UpdateMovement()
4246 {
4247 }
4248
4249 /// <summary> 4247 /// <summary>
4250 /// 4248 ///
4251 /// </summary> 4249 /// </summary>
@@ -4320,10 +4318,10 @@ namespace OpenSim.Region.Framework.Scenes
4320 4318
4321 break; 4319 break;
4322 } 4320 }
4323 SendFullUpdateToAllClients();
4324 4321
4325 SendObjectPropertiesToClient(AgentID); 4322 SendFullUpdateToAllClients();
4326 4323
4324 SendRootPartPropertiesToClient(AgentID);
4327 } 4325 }
4328 } 4326 }
4329 4327
@@ -4844,7 +4842,8 @@ namespace OpenSim.Region.Framework.Scenes
4844 if (ParentGroup.IsDeleted) 4842 if (ParentGroup.IsDeleted)
4845 return; 4843 return;
4846 4844
4847 if (ParentGroup.IsAttachment && ParentGroup.RootPart != this) 4845 if (ParentGroup.IsAttachment && ((ParentGroup.RootPart != this) ||
4846 ((ParentGroup.AttachedAvatar != remoteClient.AgentId) && (ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))))
4848 return; 4847 return;
4849 4848
4850 // Causes this thread to dig into the Client Thread Data. 4849 // Causes this thread to dig into the Client Thread Data.