aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-07-14 01:27:47 +0000
committerMelanie Thielker2008-07-14 01:27:47 +0000
commite712678689f37f7a58e02547a5dbe6a214680db2 (patch)
treea7f13c72ca14860cfb2099fe0603878e57120d7d /OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
parentMantis#1728. Thank you kindly, Mikem for a patch that solves: (diff)
downloadopensim-SC_OLD-e712678689f37f7a58e02547a5dbe6a214680db2.zip
opensim-SC_OLD-e712678689f37f7a58e02547a5dbe6a214680db2.tar.gz
opensim-SC_OLD-e712678689f37f7a58e02547a5dbe6a214680db2.tar.bz2
opensim-SC_OLD-e712678689f37f7a58e02547a5dbe6a214680db2.tar.xz
Patch #9147
Patch #4 of the region settings series. Partial functionality of the new storage system. More patches to follow.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SimStatsReporter.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index 90a971f..609b4ed 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -29,6 +29,7 @@ using System;
29using System.Timers; 29using System.Timers;
30using libsecondlife.Packets; 30using libsecondlife.Packets;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Interfaces;
32 33
33namespace OpenSim.Region.Environment.Scenes 34namespace OpenSim.Region.Environment.Scenes
34{ 35{
@@ -104,16 +105,19 @@ namespace OpenSim.Region.Environment.Scenes
104 SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats); 105 SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats);
105 106
106 107
108 private Scene m_scene;
109
107 private RegionInfo ReportingRegion; 110 private RegionInfo ReportingRegion;
108 111
109 private Timer m_report = new Timer(); 112 private Timer m_report = new Timer();
110 113
111 114
112 public SimStatsReporter(RegionInfo regionData) 115 public SimStatsReporter(Scene scene)
113 { 116 {
114 117
115 statsUpdateFactor = (float)(statsUpdatesEveryMS / 1000); 118 statsUpdateFactor = (float)(statsUpdatesEveryMS / 1000);
116 ReportingRegion = regionData; 119 m_scene = scene;
120 ReportingRegion = scene.RegionInfo;
117 for (int i = 0; i<21;i++) 121 for (int i = 0; i<21;i++)
118 { 122 {
119 sb[i] = new SimStatsPacket.StatBlock(); 123 sb[i] = new SimStatsPacket.StatBlock();
@@ -145,7 +149,8 @@ namespace OpenSim.Region.Environment.Scenes
145 statpack.Region.RegionY = ReportingRegion.RegionLocY; 149 statpack.Region.RegionY = ReportingRegion.RegionLocY;
146 try 150 try
147 { 151 {
148 statpack.Region.RegionFlags = (uint) ReportingRegion.EstateSettings.regionFlags; 152 IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
153 statpack.Region.RegionFlags = estateModule.GetRegionFlags();
149 } 154 }
150 catch (Exception) 155 catch (Exception)
151 { 156 {