aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
authorMelanie2010-03-06 20:05:33 +0000
committerMelanie2010-03-06 20:05:33 +0000
commit2e5f7ec926c7a016d124ba1e44b6b861f8c3a364 (patch)
treeccb8688f516ddc3652f88b65c6336daf7b41d3d4 /OpenSim/Region/CoreModules/ServiceConnectorsOut
parent- supporting llTextBox (diff)
parentBug fix: store correct position information upon logout. Fixes mantis #4608 (diff)
downloadopensim-SC_OLD-2e5f7ec926c7a016d124ba1e44b6b861f8c3a364.zip
opensim-SC_OLD-2e5f7ec926c7a016d124ba1e44b6b861f8c3a364.tar.gz
opensim-SC_OLD-2e5f7ec926c7a016d124ba1e44b6b861f8c3a364.tar.bz2
opensim-SC_OLD-2e5f7ec926c7a016d124ba1e44b6b861f8c3a364.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs29
1 files changed, 17 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
index 891fc14..e98df28 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
@@ -77,23 +77,28 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
77 77
78 public void OnNewClient(IClientAPI client) 78 public void OnNewClient(IClientAPI client)
79 { 79 {
80 client.OnLogout += OnLogout; 80 client.OnConnectionClosed += OnConnectionClose;
81 } 81 }
82 82
83 public void OnLogout(IClientAPI client) 83 public void OnConnectionClose(IClientAPI client)
84 { 84 {
85 client.OnLogout -= OnLogout; 85 if (client.IsLoggingOut)
86
87 ScenePresence sp = null;
88 Vector3 position = new Vector3(128, 128, 0);
89 Vector3 lookat = new Vector3(0, 1, 0);
90
91 if (m_aScene.TryGetAvatar(client.AgentId, out sp))
92 { 86 {
93 position = sp.AbsolutePosition; 87 object sp = null;
94 lookat = sp.Lookat; 88 Vector3 position = new Vector3(128, 128, 0);
89 Vector3 lookat = new Vector3(0, 1, 0);
90
91 if (client.Scene.TryGetAvatar(client.AgentId, out sp))
92 {
93 if (sp is ScenePresence)
94 {
95 position = ((ScenePresence)sp).AbsolutePosition;
96 lookat = ((ScenePresence)sp).Lookat;
97 }
98 }
99
100 m_PresenceService.LogoutAgent(client.SessionId, position, lookat);
95 } 101 }
96 m_PresenceService.LogoutAgent(client.SessionId, position, lookat);
97 102
98 } 103 }
99 } 104 }