aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-02-04 23:23:07 +0000
committerJustin Clark-Casey (justincc)2010-02-04 23:23:07 +0000
commit0a084a31e9f96cc007f953b47e3319bde6d834f2 (patch)
tree93fd9269b3bd763f1b9739f54db03a429b142818 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMerge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-0a084a31e9f96cc007f953b47e3319bde6d834f2.zip
opensim-SC_OLD-0a084a31e9f96cc007f953b47e3319bde6d834f2.tar.gz
opensim-SC_OLD-0a084a31e9f96cc007f953b47e3319bde6d834f2.tar.bz2
opensim-SC_OLD-0a084a31e9f96cc007f953b47e3319bde6d834f2.tar.xz
refactor: chain two ScenePresence constructors together to eliminate common code. No functional changes
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs26
1 files changed, 11 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index cd39cab..bcf22c3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -104,6 +104,8 @@ namespace OpenSim.Region.Framework.Scenes
104 } 104 }
105 protected ScenePresenceAnimator m_animator; 105 protected ScenePresenceAnimator m_animator;
106 106
107 protected List<SceneObjectGroup> m_attachments = new List<SceneObjectGroup>();
108
107 private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>(); 109 private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>();
108 private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO; 110 private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO;
109 private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO; 111 private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO;
@@ -215,9 +217,7 @@ namespace OpenSim.Region.Framework.Scenes
215 // Agent's Draw distance. 217 // Agent's Draw distance.
216 protected float m_DrawDistance; 218 protected float m_DrawDistance;
217 219
218 protected AvatarAppearance m_appearance; 220 protected AvatarAppearance m_appearance;
219
220 protected List<SceneObjectGroup> m_attachments = new List<SceneObjectGroup>();
221 221
222 // neighbouring regions we have enabled a child agent in 222 // neighbouring regions we have enabled a child agent in
223 // holds the seed cap for the child agent in that region 223 // holds the seed cap for the child agent in that region
@@ -630,12 +630,16 @@ namespace OpenSim.Region.Framework.Scenes
630 #endregion 630 #endregion
631 631
632 #region Constructor(s) 632 #region Constructor(s)
633 633
634 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) 634 public ScenePresence()
635 { 635 {
636 m_animator = new ScenePresenceAnimator(this);
637 m_sendCourseLocationsMethod = SendCoarseLocationsDefault; 636 m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
638 CreateSceneViewer(); 637 CreateSceneViewer();
638 m_animator = new ScenePresenceAnimator(this);
639 }
640
641 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this()
642 {
639 m_rootRegionHandle = reginfo.RegionHandle; 643 m_rootRegionHandle = reginfo.RegionHandle;
640 m_controllingClient = client; 644 m_controllingClient = client;
641 m_firstname = m_controllingClient.FirstName; 645 m_firstname = m_controllingClient.FirstName;
@@ -659,7 +663,6 @@ namespace OpenSim.Region.Framework.Scenes
659 m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize); 663 m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize);
660 m_reprioritization_timer.AutoReset = false; 664 m_reprioritization_timer.AutoReset = false;
661 665
662
663 AdjustKnownSeeds(); 666 AdjustKnownSeeds();
664 667
665 // TODO: I think, this won't send anything, as we are still a child here... 668 // TODO: I think, this won't send anything, as we are still a child here...
@@ -3321,13 +3324,6 @@ namespace OpenSim.Region.Framework.Scenes
3321 m_animator = null; 3324 m_animator = null;
3322 } 3325 }
3323 3326
3324 public ScenePresence()
3325 {
3326 m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
3327 CreateSceneViewer();
3328 m_animator = new ScenePresenceAnimator(this);
3329 }
3330
3331 public void AddAttachment(SceneObjectGroup gobj) 3327 public void AddAttachment(SceneObjectGroup gobj)
3332 { 3328 {
3333 lock (m_attachments) 3329 lock (m_attachments)