diff options
author | Teravus Ovares | 2009-01-06 00:07:24 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-01-06 00:07:24 +0000 |
commit | 0d1b8675004a37c1a5590a6825b5204b08e285e6 (patch) | |
tree | 645d251a771f4581ba16398324f8a4059918e9d1 /OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |
parent | Use correct name for friendship offer. Fixes Mantis #2959. (diff) | |
download | opensim-SC_OLD-0d1b8675004a37c1a5590a6825b5204b08e285e6.zip opensim-SC_OLD-0d1b8675004a37c1a5590a6825b5204b08e285e6.tar.gz opensim-SC_OLD-0d1b8675004a37c1a5590a6825b5204b08e285e6.tar.bz2 opensim-SC_OLD-0d1b8675004a37c1a5590a6825b5204b08e285e6.tar.xz |
* Added a way for the sim stats reporter to say to the scene that the stats are illogical.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index e2afa5a..efda140 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -39,10 +39,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
39 | { | 39 | { |
40 | public delegate void SendStatResult(SimStats stats); | 40 | public delegate void SendStatResult(SimStats stats); |
41 | 41 | ||
42 | public delegate void YourStatsAreWrong(); | ||
43 | |||
42 | public event SendStatResult OnSendStatsResult; | 44 | public event SendStatResult OnSendStatsResult; |
43 | 45 | ||
46 | public event YourStatsAreWrong OnStatsIncorrect; | ||
47 | |||
44 | private SendStatResult handlerSendStatResult = null; | 48 | private SendStatResult handlerSendStatResult = null; |
45 | 49 | ||
50 | private YourStatsAreWrong handlerStatsIncorrect = null; | ||
51 | |||
46 | private enum Stats : uint | 52 | private enum Stats : uint |
47 | { | 53 | { |
48 | TimeDilation = 0, | 54 | TimeDilation = 0, |
@@ -306,15 +312,30 @@ namespace OpenSim.Region.Environment.Scenes | |||
306 | public void SetRootAgents(int rootAgents) | 312 | public void SetRootAgents(int rootAgents) |
307 | { | 313 | { |
308 | m_rootAgents = rootAgents; | 314 | m_rootAgents = rootAgents; |
315 | CheckStatSanity(); | ||
316 | |||
309 | } | 317 | } |
310 | 318 | ||
311 | public void SetChildAgents(int childAgents) | 319 | internal void CheckStatSanity() |
312 | { | 320 | { |
313 | m_childAgents = (childAgents > 0) ? childAgents : 0; | 321 | if (m_rootAgents < 0 || m_childAgents < 0) |
314 | if (childAgents < 0) | ||
315 | { | 322 | { |
316 | //List<ScenePresence> avs= m_scene.GetScenePresences(); | 323 | handlerStatsIncorrect = OnStatsIncorrect; |
324 | if (handlerStatsIncorrect != null) | ||
325 | { | ||
326 | handlerStatsIncorrect(); | ||
327 | } | ||
317 | } | 328 | } |
329 | if (m_rootAgents == 0 && m_childAgents == 0) | ||
330 | { | ||
331 | m_unAckedBytes = 0; | ||
332 | } | ||
333 | } | ||
334 | |||
335 | public void SetChildAgents(int childAgents) | ||
336 | { | ||
337 | m_childAgents = childAgents; | ||
338 | CheckStatSanity(); | ||
318 | } | 339 | } |
319 | 340 | ||
320 | public void SetObjects(int objects) | 341 | public void SetObjects(int objects) |