diff options
author | Tom Grimshaw | 2010-06-25 14:26:07 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-06-25 14:26:07 -0700 |
commit | 30397b6fbc3a94dfca4073f36a2b4ff011b1618c (patch) | |
tree | 9f6f7531de18c285f506ae1ec8a60e43fe8d418f /OpenSim/Region/Framework/Scenes | |
parent | Add two events: OnAttachToBackup and OnDetachFromBackup. (diff) | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC-30397b6fbc3a94dfca4073f36a2b4ff011b1618c.zip opensim-SC-30397b6fbc3a94dfca4073f36a2b4ff011b1618c.tar.gz opensim-SC-30397b6fbc3a94dfca4073f36a2b4ff011b1618c.tar.bz2 opensim-SC-30397b6fbc3a94dfca4073f36a2b4ff011b1618c.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-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 904e38a..ce7b0eb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -659,7 +659,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
659 | if (!Entities.Remove(agentID)) | 659 | if (!Entities.Remove(agentID)) |
660 | { | 660 | { |
661 | m_log.WarnFormat( | 661 | m_log.WarnFormat( |
662 | "[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", | 662 | "[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", |
663 | agentID); | 663 | agentID); |
664 | } | 664 | } |
665 | 665 | ||
@@ -668,12 +668,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
668 | { | 668 | { |
669 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); | 669 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); |
670 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); | 670 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); |
671 | 671 | ||
672 | // Remember the old presene reference from the dictionary | ||
673 | ScenePresence oldref = newmap[agentID]; | ||
674 | // Remove the presence reference from the dictionary | 672 | // Remove the presence reference from the dictionary |
675 | if (newmap.Remove(agentID)) | 673 | if (newmap.ContainsKey(agentID)) |
676 | { | 674 | { |
675 | ScenePresence oldref = newmap[agentID]; | ||
676 | newmap.Remove(agentID); | ||
677 | |||
677 | // Find the index in the list where the old ref was stored and remove the reference | 678 | // Find the index in the list where the old ref was stored and remove the reference |
678 | newlist.RemoveAt(newlist.IndexOf(oldref)); | 679 | newlist.RemoveAt(newlist.IndexOf(oldref)); |
679 | // Swap out the dictionary and list with new references | 680 | // Swap out the dictionary and list with new references |
@@ -682,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
682 | } | 683 | } |
683 | else | 684 | else |
684 | { | 685 | { |
685 | m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); | 686 | m_log.WarnFormat("[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); |
686 | } | 687 | } |
687 | } | 688 | } |
688 | finally | 689 | finally |