aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs40
1 files changed, 21 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index f1555f7..1b7ca8b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -106,6 +106,16 @@ namespace OpenSim.Region.Framework.Scenes
106 } 106 }
107 protected ScenePresenceAnimator m_animator; 107 protected ScenePresenceAnimator m_animator;
108 108
109 /// <value>
110 /// The scene objects attached to this avatar. Do not change this list directly - use methods such as
111 /// AddAttachment() and RemoveAttachment(). Lock this list when performing any read operations upon it.
112 /// </value>
113 public List<SceneObjectGroup> Attachments
114 {
115 get { return m_attachments; }
116 }
117 protected List<SceneObjectGroup> m_attachments = new List<SceneObjectGroup>();
118
109 private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>(); 119 private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>();
110 private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO; 120 private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO;
111 private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO; 121 private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO;
@@ -223,9 +233,7 @@ namespace OpenSim.Region.Framework.Scenes
223 // Agent's Draw distance. 233 // Agent's Draw distance.
224 protected float m_DrawDistance; 234 protected float m_DrawDistance;
225 235
226 protected AvatarAppearance m_appearance; 236 protected AvatarAppearance m_appearance;
227
228 protected List<SceneObjectGroup> m_attachments = new List<SceneObjectGroup>();
229 237
230 // neighbouring regions we have enabled a child agent in 238 // neighbouring regions we have enabled a child agent in
231 // holds the seed cap for the child agent in that region 239 // holds the seed cap for the child agent in that region
@@ -640,12 +648,16 @@ namespace OpenSim.Region.Framework.Scenes
640 #endregion 648 #endregion
641 649
642 #region Constructor(s) 650 #region Constructor(s)
643 651
644 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) 652 public ScenePresence()
645 { 653 {
646 m_animator = new ScenePresenceAnimator(this);
647 m_sendCourseLocationsMethod = SendCoarseLocationsDefault; 654 m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
648 CreateSceneViewer(); 655 CreateSceneViewer();
656 m_animator = new ScenePresenceAnimator(this);
657 }
658
659 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this()
660 {
649 m_rootRegionHandle = reginfo.RegionHandle; 661 m_rootRegionHandle = reginfo.RegionHandle;
650 m_controllingClient = client; 662 m_controllingClient = client;
651 m_firstname = m_controllingClient.FirstName; 663 m_firstname = m_controllingClient.FirstName;
@@ -669,7 +681,6 @@ namespace OpenSim.Region.Framework.Scenes
669 m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize); 681 m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize);
670 m_reprioritization_timer.AutoReset = false; 682 m_reprioritization_timer.AutoReset = false;
671 683
672
673 AdjustKnownSeeds(); 684 AdjustKnownSeeds();
674 Animator.TrySetMovementAnimation("STAND"); 685 Animator.TrySetMovementAnimation("STAND");
675 // we created a new ScenePresence (a new child agent) in a fresh region. 686 // we created a new ScenePresence (a new child agent) in a fresh region.
@@ -1150,7 +1161,6 @@ namespace OpenSim.Region.Framework.Scenes
1150 1161
1151 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); 1162 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look);
1152 SendInitialData(); 1163 SendInitialData();
1153
1154 } 1164 }
1155 1165
1156 /// <summary> 1166 /// <summary>
@@ -3388,8 +3398,7 @@ namespace OpenSim.Region.Framework.Scenes
3388 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; 3398 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
3389 m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong 3399 m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
3390 m_physicsActor.SubscribeEvents(500); 3400 m_physicsActor.SubscribeEvents(500);
3391 m_physicsActor.LocalID = LocalId; 3401 m_physicsActor.LocalID = LocalId;
3392
3393 } 3402 }
3394 3403
3395 private void OutOfBoundsCall(Vector3 pos) 3404 private void OutOfBoundsCall(Vector3 pos)
@@ -3399,7 +3408,7 @@ namespace OpenSim.Region.Framework.Scenes
3399 3408
3400 //AddToPhysicalScene(flying); 3409 //AddToPhysicalScene(flying);
3401 if (ControllingClient != null) 3410 if (ControllingClient != null)
3402 ControllingClient.SendAgentAlertMessage("Physics is having a problem with your avatar. You may not be able to move until you relog.",true); 3411 ControllingClient.SendAgentAlertMessage("Physics is having a problem with your avatar. You may not be able to move until you relog.", true);
3403 } 3412 }
3404 3413
3405 // Event called by the physics plugin to tell the avatar about a collision. 3414 // Event called by the physics plugin to tell the avatar about a collision.
@@ -3539,13 +3548,6 @@ namespace OpenSim.Region.Framework.Scenes
3539 m_animator = null; 3548 m_animator = null;
3540 } 3549 }
3541 3550
3542 public ScenePresence()
3543 {
3544 m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
3545 CreateSceneViewer();
3546 m_animator = new ScenePresenceAnimator(this);
3547 }
3548
3549 public void AddAttachment(SceneObjectGroup gobj) 3551 public void AddAttachment(SceneObjectGroup gobj)
3550 { 3552 {
3551 lock (m_attachments) 3553 lock (m_attachments)