diff options
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index f6d82c4..5502f97 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -3130,16 +3130,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
3130 | // m_sceneGraph.removeUserCount(true); | 3130 | // m_sceneGraph.removeUserCount(true); |
3131 | // } | 3131 | // } |
3132 | 3132 | ||
3133 | // Tell a single agent to disconnect from the region. | 3133 | // Don't do this to root agents on logout, it's not nice for the viewer |
3134 | IEventQueue eq = RequestModuleInterface<IEventQueue>(); | 3134 | if (presence.IsChildAgent) |
3135 | if (eq != null) | ||
3136 | { | 3135 | { |
3137 | OSD Item = EventQueueHelper.DisableSimulator(RegionInfo.RegionHandle); | 3136 | // Tell a single agent to disconnect from the region. |
3138 | eq.Enqueue(Item, agentID); | 3137 | IEventQueue eq = RequestModuleInterface<IEventQueue>(); |
3138 | if (eq != null) | ||
3139 | { | ||
3140 | OSD Item = EventQueueHelper.DisableSimulator(RegionInfo.RegionHandle); | ||
3141 | eq.Enqueue(Item, agentID); | ||
3142 | } | ||
3143 | else | ||
3144 | presence.ControllingClient.SendShutdownConnectionNotice(); | ||
3139 | } | 3145 | } |
3140 | else | ||
3141 | presence.ControllingClient.SendShutdownConnectionNotice(); | ||
3142 | |||
3143 | presence.ControllingClient.Close(true); | 3146 | presence.ControllingClient.Close(true); |
3144 | 3147 | ||
3145 | } | 3148 | } |