Avoid sending DisableSimulator event to the root agent upon logout.

0.6.1-post-fixes
diva 2008-12-16 19:44:32 +00:00
parent 36ee0e8fb9
commit 4b81ec02d7
1 changed files with 11 additions and 8 deletions

View File

@ -3130,16 +3130,19 @@ namespace OpenSim.Region.Environment.Scenes
// m_sceneGraph.removeUserCount(true);
// }
// Tell a single agent to disconnect from the region.
IEventQueue eq = RequestModuleInterface<IEventQueue>();
if (eq != null)
// Don't do this to root agents on logout, it's not nice for the viewer
if (presence.IsChildAgent)
{
OSD Item = EventQueueHelper.DisableSimulator(RegionInfo.RegionHandle);
eq.Enqueue(Item, agentID);
// Tell a single agent to disconnect from the region.
IEventQueue eq = RequestModuleInterface<IEventQueue>();
if (eq != null)
{
OSD Item = EventQueueHelper.DisableSimulator(RegionInfo.RegionHandle);
eq.Enqueue(Item, agentID);
}
else
presence.ControllingClient.SendShutdownConnectionNotice();
}
else
presence.ControllingClient.SendShutdownConnectionNotice();
presence.ControllingClient.Close(true);
}