aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-26 23:06:41 +0100
committerJustin Clark-Casey (justincc)2011-08-26 23:06:41 +0100
commit15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a (patch)
tree25b452008eb21a6426617c65af866161cf3bcae8 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentrefactor: move SOG.DetachToGround() to AttachmentsModule.DetachSceneObjectToG... (diff)
downloadopensim-SC-15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a.zip
opensim-SC-15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a.tar.gz
opensim-SC-15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a.tar.bz2
opensim-SC-15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a.tar.xz
refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar
This does a tiny bit to reduce code complexity, memory requirement and the cpu time of pointlessly setting this field to the same value in every SOP
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index e3b8fc8..fada688 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -169,6 +169,14 @@ namespace OpenSim.Region.Framework.Scenes
169 } 169 }
170 170
171 /// <summary> 171 /// <summary>
172 /// The avatar to which this scene object is attached.
173 /// </summary>
174 /// <remarks>
175 /// If we're not attached to an avatar then this is UUID.Zero
176 /// </remarks>
177 public UUID AttachedAvatar { get; set; }
178
179 /// <summary>
172 /// Is this scene object phantom? 180 /// Is this scene object phantom?
173 /// </summary> 181 /// </summary>
174 /// <remarks> 182 /// <remarks>
@@ -1540,7 +1548,7 @@ namespace OpenSim.Region.Framework.Scenes
1540 { 1548 {
1541 if (IsAttachment) 1549 if (IsAttachment)
1542 { 1550 {
1543 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); 1551 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
1544 if (avatar != null) 1552 if (avatar != null)
1545 { 1553 {
1546 avatar.PushForce(impulse); 1554 avatar.PushForce(impulse);
@@ -1622,7 +1630,7 @@ namespace OpenSim.Region.Framework.Scenes
1622 { 1630 {
1623 if (IsAttachment) 1631 if (IsAttachment)
1624 { 1632 {
1625 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); 1633 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
1626 if (avatar != null) 1634 if (avatar != null)
1627 { 1635 {
1628 avatar.MoveToTarget(target, false); 1636 avatar.MoveToTarget(target, false);