diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index 7a75a89..62b8278 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
72 | public void OnMakeRootAgent(ScenePresence sp) | 72 | public void OnMakeRootAgent(ScenePresence sp) |
73 | { | 73 | { |
74 | m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); | 74 | m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); |
75 | m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | 75 | m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID); |
76 | } | 76 | } |
77 | 77 | ||
78 | public void OnNewClient(IClientAPI client) | 78 | public void OnNewClient(IClientAPI client) |
@@ -85,19 +85,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
85 | if (client.IsLoggingOut) | 85 | if (client.IsLoggingOut) |
86 | { | 86 | { |
87 | object sp = null; | 87 | object sp = null; |
88 | Vector3 position = new Vector3(128, 128, 0); | ||
89 | Vector3 lookat = new Vector3(0, 1, 0); | ||
90 | |||
91 | if (client.Scene.TryGetScenePresence(client.AgentId, out sp)) | 88 | if (client.Scene.TryGetScenePresence(client.AgentId, out sp)) |
92 | { | 89 | { |
93 | if (sp is ScenePresence) | 90 | if (sp is ScenePresence) |
94 | { | 91 | { |
95 | position = ((ScenePresence)sp).AbsolutePosition; | 92 | if (((ScenePresence)sp).IsChildAgent) |
96 | lookat = ((ScenePresence)sp).Lookat; | 93 | return; |
97 | } | 94 | } |
98 | } | 95 | } |
99 | 96 | ||
100 | m_PresenceService.LogoutAgent(client.SessionId, position, lookat); | 97 | m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); |
98 | m_PresenceService.LogoutAgent(client.SessionId); | ||
101 | } | 99 | } |
102 | 100 | ||
103 | } | 101 | } |