diff options
author | Justin Clark-Casey (justincc) | 2010-02-04 23:23:07 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-02-04 23:23:07 +0000 |
commit | 0a084a31e9f96cc007f953b47e3319bde6d834f2 (patch) | |
tree | 93fd9269b3bd763f1b9739f54db03a429b142818 | |
parent | Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim (diff) | |
download | opensim-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
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 26 |
2 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 1d364d4..6dc6f01 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -5190,6 +5190,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5190 | { | 5190 | { |
5191 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; | 5191 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; |
5192 | 5192 | ||
5193 | //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID); | ||
5194 | |||
5193 | #region Packet Session and User Check | 5195 | #region Packet Session and User Check |
5194 | if (m_checkPackets) | 5196 | if (m_checkPackets) |
5195 | { | 5197 | { |
@@ -5210,7 +5212,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5210 | args.Type = ChatTypeEnum.Shout; | 5212 | args.Type = ChatTypeEnum.Shout; |
5211 | args.Position = new Vector3(); | 5213 | args.Position = new Vector3(); |
5212 | args.Scene = Scene; | 5214 | args.Scene = Scene; |
5213 | args.Sender = this; | 5215 | args.Sender = this; |
5214 | ChatMessage handlerChatFromClient2 = OnChatFromClient; | 5216 | ChatMessage handlerChatFromClient2 = OnChatFromClient; |
5215 | if (handlerChatFromClient2 != null) | 5217 | if (handlerChatFromClient2 != null) |
5216 | handlerChatFromClient2(this, args); | 5218 | handlerChatFromClient2(this, args); |
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) |