Fix bug where NPCs would establish child agents on other neighbour regions that had come up after the NPC was created.
parent
19d271d3fc
commit
90dc5f47e7
|
@ -864,16 +864,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ForEachRootScenePresence(delegate(ScenePresence agent)
|
ForEachRootScenePresence(delegate(ScenePresence agent)
|
||||||
{
|
{
|
||||||
//agent.ControllingClient.new
|
//agent.ControllingClient.new
|
||||||
//this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
|
//this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
|
||||||
|
|
||||||
List<ulong> old = new List<ulong>();
|
List<ulong> old = new List<ulong>();
|
||||||
old.Add(otherRegion.RegionHandle);
|
old.Add(otherRegion.RegionHandle);
|
||||||
agent.DropOldNeighbours(old);
|
agent.DropOldNeighbours(old);
|
||||||
if (m_teleportModule != null)
|
if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc)
|
||||||
m_teleportModule.EnableChildAgent(agent, otherRegion);
|
m_teleportModule.EnableChildAgent(agent, otherRegion);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
|
@ -881,7 +881,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// This shouldn't happen too often anymore.
|
// This shouldn't happen too often anymore.
|
||||||
m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception");
|
m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1009,10 +1008,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ForEachRootScenePresence(delegate(ScenePresence agent)
|
ForEachRootScenePresence(delegate(ScenePresence agent)
|
||||||
{
|
{
|
||||||
if (m_teleportModule != null)
|
if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc)
|
||||||
m_teleportModule.EnableChildAgent(agent, r);
|
m_teleportModule.EnableChildAgent(agent, r);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue