aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs25
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs11
4 files changed, 16 insertions, 24 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index a78ad98..36a0ffc 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -297,24 +297,11 @@ namespace OpenSim.Region.Environment.Scenes
297 m_httpListener = httpServer; 297 m_httpListener = httpServer;
298 m_dumpAssetsToFile = dumpAssetsToFile; 298 m_dumpAssetsToFile = dumpAssetsToFile;
299 299
300 if ((RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts) 300 m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts;
301 { 301
302 m_scripts_enabled = false; 302 m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics;
303 }
304 else
305 {
306 m_scripts_enabled = true;
307 }
308 if ((RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipPhysics) == Simulator.RegionFlags.SkipPhysics)
309 {
310 m_physics_enabled = false;
311 }
312 else
313 {
314 m_physics_enabled = true;
315 }
316 303
317 m_statsReporter = new SimStatsReporter(regInfo); 304 m_statsReporter = new SimStatsReporter(this);
318 m_statsReporter.OnSendStatsResult += SendSimStatsPackets; 305 m_statsReporter.OnSendStatsResult += SendSimStatsPackets;
319 306
320 m_statsReporter.SetObjectCapacity(objectCapacity); 307 m_statsReporter.SetObjectCapacity(objectCapacity);
@@ -1076,7 +1063,7 @@ namespace OpenSim.Region.Environment.Scenes
1076 //float tmpval = (float)hm[x, y]; 1063 //float tmpval = (float)hm[x, y];
1077 float heightvalue = (float)hm[x, y]; 1064 float heightvalue = (float)hm[x, y];
1078 1065
1079 if ((float)heightvalue > m_regInfo.EstateSettings.waterHeight) 1066 if (heightvalue > (float)m_regInfo.RegionSettings.WaterHeight)
1080 { 1067 {
1081 // scale height value 1068 // scale height value
1082 heightvalue = low + mid * (heightvalue - low) / mid; 1069 heightvalue = low + mid * (heightvalue - low) / mid;
@@ -1110,7 +1097,7 @@ namespace OpenSim.Region.Environment.Scenes
1110 else 1097 else
1111 { 1098 {
1112 // Y flip the cordinates 1099 // Y flip the cordinates
1113 heightvalue = m_regInfo.EstateSettings.waterHeight - heightvalue; 1100 heightvalue = (float)m_regInfo.RegionSettings.WaterHeight - heightvalue;
1114 if (heightvalue > 19) 1101 if (heightvalue > 19)
1115 heightvalue = 19; 1102 heightvalue = 19;
1116 if (heightvalue < 0) 1103 if (heightvalue < 0)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 8feb852..0696432 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Environment.Scenes
58 public void CreateScriptInstances(int startParam, bool postOnRez) 58 public void CreateScriptInstances(int startParam, bool postOnRez)
59 { 59 {
60 // Don't start scripts if they're turned off in the region! 60 // Don't start scripts if they're turned off in the region!
61 if (!((m_scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts)) 61 if (!m_scene.RegionInfo.RegionSettings.DisableScripts)
62 { 62 {
63 foreach (SceneObjectPart part in m_parts.Values) 63 foreach (SceneObjectPart part in m_parts.Values)
64 { 64 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index d407392..841b7b6 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -173,7 +173,7 @@ namespace OpenSim.Region.Environment.Scenes
173 173
174 AddFlag(LLObject.ObjectFlags.Scripted); 174 AddFlag(LLObject.ObjectFlags.Scripted);
175 175
176 if (!((m_parentGroup.Scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts)) 176 if (!m_parentGroup.Scene.RegionInfo.RegionSettings.DisableScripts)
177 { 177 {
178 AssetCache cache = m_parentGroup.Scene.AssetCache; 178 AssetCache cache = m_parentGroup.Scene.AssetCache;
179 179
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 {