diff options
author | Melanie | 2010-06-25 20:26:48 +0100 |
---|---|---|
committer | Melanie | 2010-06-25 20:26:48 +0100 |
commit | dc9e9931eb6e1614d2a2a5f8c28941b5d6280103 (patch) | |
tree | 57a9714e264575c2b6045db07952495b81adeb6e /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Make "Allow other residents to edit terrain" default to FALSE (diff) | |
parent | fix web request exception reporting properly this time (diff) | |
download | opensim-SC-dc9e9931eb6e1614d2a2a5f8c28941b5d6280103.zip opensim-SC-dc9e9931eb6e1614d2a2a5f8c28941b5d6280103.tar.gz opensim-SC-dc9e9931eb6e1614d2a2a5f8c28941b5d6280103.tar.bz2 opensim-SC-dc9e9931eb6e1614d2a2a5f8c28941b5d6280103.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 80f9114..06bc5cd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -633,7 +633,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
633 | if (!Entities.Remove(agentID)) | 633 | if (!Entities.Remove(agentID)) |
634 | { | 634 | { |
635 | m_log.WarnFormat( | 635 | m_log.WarnFormat( |
636 | "[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", | 636 | "[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", |
637 | agentID); | 637 | agentID); |
638 | } | 638 | } |
639 | 639 | ||
@@ -642,12 +642,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
642 | { | 642 | { |
643 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); | 643 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); |
644 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); | 644 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); |
645 | 645 | ||
646 | // Remember the old presene reference from the dictionary | ||
647 | ScenePresence oldref = newmap[agentID]; | ||
648 | // Remove the presence reference from the dictionary | 646 | // Remove the presence reference from the dictionary |
649 | if (newmap.Remove(agentID)) | 647 | if (newmap.ContainsKey(agentID)) |
650 | { | 648 | { |
649 | ScenePresence oldref = newmap[agentID]; | ||
650 | newmap.Remove(agentID); | ||
651 | |||
651 | // Find the index in the list where the old ref was stored and remove the reference | 652 | // Find the index in the list where the old ref was stored and remove the reference |
652 | newlist.RemoveAt(newlist.IndexOf(oldref)); | 653 | newlist.RemoveAt(newlist.IndexOf(oldref)); |
653 | // Swap out the dictionary and list with new references | 654 | // Swap out the dictionary and list with new references |
@@ -656,7 +657,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
656 | } | 657 | } |
657 | else | 658 | else |
658 | { | 659 | { |
659 | m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); | 660 | m_log.WarnFormat("[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); |
660 | } | 661 | } |
661 | } | 662 | } |
662 | finally | 663 | finally |