aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-12 18:03:37 +0000
committerTeravus Ovares2007-12-12 18:03:37 +0000
commit5e6483f209966aaf1ad503627c73608cd7e59648 (patch)
tree8fc61f0532659783d14f8f7134b2cda3a237da75 /OpenSim/Region/Environment
parentThanks to Alondria for: Adding vector->string and rotation->string, (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs22
3 files changed, 15 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 3fe9a7b..a7515f7 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -870,7 +870,7 @@ namespace OpenSim.Region.Environment.Scenes
870 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID); 870 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID);
871 copy.AbsolutePosition = copy.AbsolutePosition + offset; 871 copy.AbsolutePosition = copy.AbsolutePosition + offset;
872 Entities.Add(copy.UUID, copy); 872 Entities.Add(copy.UUID, copy);
873 873 m_numPrim++;
874 copy.ScheduleGroupForFullUpdate(); 874 copy.ScheduleGroupForFullUpdate();
875 } 875 }
876 } 876 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index e373eda..f13178c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -518,6 +518,7 @@ namespace OpenSim.Region.Environment.Scenes
518 lock (Entities) 518 lock (Entities)
519 { 519 {
520 Entities.Remove(group.UUID); 520 Entities.Remove(group.UUID);
521 m_innerScene.RemoveAPrimCount();
521 } 522 }
522 group.DeleteParts(); 523 group.DeleteParts();
523 } 524 }
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