diff options
author | Teravus Ovares | 2007-12-12 18:03:37 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-12 18:03:37 +0000 |
commit | 5e6483f209966aaf1ad503627c73608cd7e59648 (patch) | |
tree | 8fc61f0532659783d14f8f7134b2cda3a237da75 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Thanks to Alondria for: Adding vector->string and rotation->string, (diff) | |
download | opensim-SC-5e6483f209966aaf1ad503627c73608cd7e59648.zip opensim-SC-5e6483f209966aaf1ad503627c73608cd7e59648.tar.gz opensim-SC-5e6483f209966aaf1ad503627c73608cd7e59648.tar.bz2 opensim-SC-5e6483f209966aaf1ad503627c73608cd7e59648.tar.xz |
* In our quest for sim heartbeat stats, we're a touch closer to accurate object count on sim stats.
* Fixed a rare, but possible NullReferenceException
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 |