diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d2a8ad09ac..e7f835cdb6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -864,16 +864,16 @@ namespace OpenSim.Region.Framework.Scenes try { ForEachRootScenePresence(delegate(ScenePresence agent) - { - //agent.ControllingClient.new - //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); + { + //agent.ControllingClient.new + //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); - List old = new List(); - old.Add(otherRegion.RegionHandle); - agent.DropOldNeighbours(old); - if (m_teleportModule != null) - m_teleportModule.EnableChildAgent(agent, otherRegion); - }); + List old = new List(); + old.Add(otherRegion.RegionHandle); + agent.DropOldNeighbours(old); + if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) + m_teleportModule.EnableChildAgent(agent, otherRegion); + }); } catch (NullReferenceException) { @@ -881,7 +881,6 @@ namespace OpenSim.Region.Framework.Scenes // This shouldn't happen too often anymore. m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception"); } - } else { @@ -1009,10 +1008,10 @@ namespace OpenSim.Region.Framework.Scenes try { ForEachRootScenePresence(delegate(ScenePresence agent) - { - if (m_teleportModule != null) - m_teleportModule.EnableChildAgent(agent, r); - }); + { + if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) + m_teleportModule.EnableChildAgent(agent, r); + }); } catch (NullReferenceException) {