diff options
author | Justin Clark-Casey (justincc) | 2012-02-21 01:57:19 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-21 01:57:19 +0000 |
commit | 90dc5f47e7db7d921ad82033a581fcd5c5704906 (patch) | |
tree | 8e4b9d9e7ac132195a9cc1dacb0097c16a0034ed /OpenSim | |
parent | Remove PhysXPlugin and wrappers. (diff) | |
download | opensim-SC_OLD-90dc5f47e7db7d921ad82033a581fcd5c5704906.zip opensim-SC_OLD-90dc5f47e7db7d921ad82033a581fcd5c5704906.tar.gz opensim-SC_OLD-90dc5f47e7db7d921ad82033a581fcd5c5704906.tar.bz2 opensim-SC_OLD-90dc5f47e7db7d921ad82033a581fcd5c5704906.tar.xz |
Fix bug where NPCs would establish child agents on other neighbour regions that had come up after the NPC was created.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d2a8ad0..e7f835c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -864,16 +864,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
864 | try | 864 | try |
865 | { | 865 | { |
866 | ForEachRootScenePresence(delegate(ScenePresence agent) | 866 | ForEachRootScenePresence(delegate(ScenePresence agent) |
867 | { | 867 | { |
868 | //agent.ControllingClient.new | 868 | //agent.ControllingClient.new |
869 | //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); | 869 | //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); |
870 | 870 | ||
871 | List<ulong> old = new List<ulong>(); | 871 | List<ulong> old = new List<ulong>(); |
872 | old.Add(otherRegion.RegionHandle); | 872 | old.Add(otherRegion.RegionHandle); |
873 | agent.DropOldNeighbours(old); | 873 | agent.DropOldNeighbours(old); |
874 | if (m_teleportModule != null) | 874 | if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) |
875 | m_teleportModule.EnableChildAgent(agent, otherRegion); | 875 | m_teleportModule.EnableChildAgent(agent, otherRegion); |
876 | }); | 876 | }); |
877 | } | 877 | } |
878 | catch (NullReferenceException) | 878 | catch (NullReferenceException) |
879 | { | 879 | { |
@@ -881,7 +881,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
881 | // This shouldn't happen too often anymore. | 881 | // This shouldn't happen too often anymore. |
882 | m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception"); | 882 | m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception"); |
883 | } | 883 | } |
884 | |||
885 | } | 884 | } |
886 | else | 885 | else |
887 | { | 886 | { |
@@ -1009,10 +1008,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1009 | try | 1008 | try |
1010 | { | 1009 | { |
1011 | ForEachRootScenePresence(delegate(ScenePresence agent) | 1010 | ForEachRootScenePresence(delegate(ScenePresence agent) |
1012 | { | 1011 | { |
1013 | if (m_teleportModule != null) | 1012 | if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) |
1014 | m_teleportModule.EnableChildAgent(agent, r); | 1013 | m_teleportModule.EnableChildAgent(agent, r); |
1015 | }); | 1014 | }); |
1016 | } | 1015 | } |
1017 | catch (NullReferenceException) | 1016 | catch (NullReferenceException) |
1018 | { | 1017 | { |