diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ef6d1a1..934e425 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -966,7 +966,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
966 | // subscribe to physics events. | 966 | // subscribe to physics events. |
967 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 967 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
968 | } | 968 | } |
969 | m_innerScene.AddAPrimCount(); | ||
970 | } | 969 | } |
971 | } | 970 | } |
972 | 971 | ||
@@ -1162,19 +1161,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
1162 | /// <param name="agentID"></param> | 1161 | /// <param name="agentID"></param> |
1163 | public override void RemoveClient(LLUUID agentID) | 1162 | public override void RemoveClient(LLUUID agentID) |
1164 | { | 1163 | { |
1165 | m_eventManager.TriggerOnRemovePresence(agentID); | ||
1166 | |||
1167 | ScenePresence avatar = GetScenePresence(agentID); | 1164 | ScenePresence avatar = GetScenePresence(agentID); |
1168 | 1165 | try | |
1169 | if (avatar.IsChildAgent) | ||
1170 | { | 1166 | { |
1171 | m_innerScene.removeUserCount(false); | 1167 | if (avatar.IsChildAgent) |
1168 | { | ||
1169 | m_innerScene.removeUserCount(false); | ||
1170 | } | ||
1171 | else | ||
1172 | { | ||
1173 | m_innerScene.removeUserCount(true); | ||
1174 | } | ||
1172 | } | 1175 | } |
1173 | else | 1176 | catch (System.NullReferenceException) |
1174 | { | 1177 | { |
1175 | m_innerScene.removeUserCount(true); | 1178 | // We don't know which count to remove it from |
1179 | // Avatar is already disposed :/ | ||
1176 | } | 1180 | } |
1177 | 1181 | m_eventManager.TriggerOnRemovePresence(agentID); | |
1178 | Broadcast(delegate(IClientAPI client) | 1182 | Broadcast(delegate(IClientAPI client) |
1179 | { | 1183 | { |
1180 | try | 1184 | try |