aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs52
1 files changed, 50 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index c0e07cb..b274d47 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -57,6 +57,9 @@ namespace OpenSim.Region.Environment.Scenes
57 protected RegionInfo m_regInfo; 57 protected RegionInfo m_regInfo;
58 protected Scene m_parentScene; 58 protected Scene m_parentScene;
59 protected PermissionManager PermissionsMngr; 59 protected PermissionManager PermissionsMngr;
60 protected int m_numRootAgents = 0;
61 protected int m_numPrim = 0;
62 protected int m_numChildAgents = 0;
60 63
61 internal object m_syncRoot = new object(); 64 internal object m_syncRoot = new object();
62 65
@@ -133,11 +136,11 @@ namespace OpenSim.Region.Environment.Scenes
133 } 136 }
134 } 137 }
135 138
136 internal void UpdatePhysics(double elapsed) 139 internal float UpdatePhysics(double elapsed)
137 { 140 {
138 lock (m_syncRoot) 141 lock (m_syncRoot)
139 { 142 {
140 _PhyScene.Simulate((float)elapsed); 143 return _PhyScene.Simulate((float)elapsed);
141 } 144 }
142 } 145 }
143 146
@@ -171,6 +174,7 @@ namespace OpenSim.Region.Environment.Scenes
171 { 174 {
172 // QuadTree.AddObject(sceneObject); 175 // QuadTree.AddObject(sceneObject);
173 Entities.Add(sceneObject.UUID, sceneObject); 176 Entities.Add(sceneObject.UUID, sceneObject);
177 m_numPrim++;
174 } 178 }
175 } 179 }
176 180
@@ -183,6 +187,7 @@ namespace OpenSim.Region.Environment.Scenes
183 if (((SceneObjectGroup)obj).LocalId == localID) 187 if (((SceneObjectGroup)obj).LocalId == localID)
184 { 188 {
185 m_parentScene.RemoveEntity((SceneObjectGroup)obj); 189 m_parentScene.RemoveEntity((SceneObjectGroup)obj);
190 m_numPrim--;
186 return; 191 return;
187 } 192 }
188 } 193 }
@@ -198,10 +203,12 @@ namespace OpenSim.Region.Environment.Scenes
198 203
199 if (child) 204 if (child)
200 { 205 {
206 m_numChildAgents++;
201 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new child agent."); 207 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new child agent.");
202 } 208 }
203 else 209 else
204 { 210 {
211 m_numRootAgents++;
205 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new root agent."); 212 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new root agent.");
206 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Adding Physical agent."); 213 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Adding Physical agent.");
207 214
@@ -233,6 +240,47 @@ namespace OpenSim.Region.Environment.Scenes
233 240
234 return newAvatar; 241 return newAvatar;
235 } 242 }
243 public void SwapRootChildAgent(bool direction_RC_CR_T_F)
244 {
245 if (direction_RC_CR_T_F)
246 {
247 m_numRootAgents--;
248 m_numChildAgents++;
249 }
250 else
251 {
252 m_numChildAgents--;
253 m_numRootAgents++;
254 }
255 }
256 public void removeUserCount(bool TypeRCTF)
257 {
258 if (TypeRCTF)
259 {
260 m_numRootAgents--;
261 }
262 else
263 {
264 m_numChildAgents--;
265 }
266 }
267 public void RemoveAPrimCount()
268 {
269 m_numPrim--;
270 }
271 public void AddAPrimCount()
272 {
273 m_numPrim++;
274 }
275 public int GetChildAgentCount()
276 {
277 return m_numChildAgents;
278 }
279
280 public int GetRootAgentCount()
281 {
282 return m_numRootAgents;
283 }
236 #endregion 284 #endregion
237 285
238 #region Get Methods 286 #region Get Methods