mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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
This commit is contained in:
@@ -168,6 +168,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The avatar to which this scene object is attached.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If we're not attached to an avatar then this is UUID.Zero
|
||||
/// </remarks>
|
||||
public UUID AttachedAvatar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Is this scene object phantom?
|
||||
/// </summary>
|
||||
@@ -1540,7 +1548,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (IsAttachment)
|
||||
{
|
||||
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
|
||||
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
|
||||
if (avatar != null)
|
||||
{
|
||||
avatar.PushForce(impulse);
|
||||
@@ -1622,7 +1630,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (IsAttachment)
|
||||
{
|
||||
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
|
||||
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
|
||||
if (avatar != null)
|
||||
{
|
||||
avatar.MoveToTarget(target, false);
|
||||
|
||||
Reference in New Issue
Block a user