aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs48
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs12
2 files changed, 31 insertions, 29 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8591b09..8c76b82 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -637,7 +637,6 @@ namespace OpenSim.Region.Framework.Scenes
637 m_SimulationDataService = simDataService; 637 m_SimulationDataService = simDataService;
638 m_EstateDataService = estateDataService; 638 m_EstateDataService = estateDataService;
639 m_regionHandle = m_regInfo.RegionHandle; 639 m_regionHandle = m_regInfo.RegionHandle;
640 m_regionName = m_regInfo.RegionName;
641 m_lastIncoming = 0; 640 m_lastIncoming = 0;
642 m_lastOutgoing = 0; 641 m_lastOutgoing = 0;
643 642
@@ -654,7 +653,7 @@ namespace OpenSim.Region.Framework.Scenes
654 // resave. 653 // resave.
655 // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new 654 // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new
656 // region is set up and avoid these gyrations. 655 // region is set up and avoid these gyrations.
657 RegionSettings rs = simDataService.LoadRegionSettings(m_regInfo.RegionID); 656 RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID);
658 bool updatedTerrainTextures = false; 657 bool updatedTerrainTextures = false;
659 if (rs.TerrainTexture1 == UUID.Zero) 658 if (rs.TerrainTexture1 == UUID.Zero)
660 { 659 {
@@ -683,10 +682,10 @@ namespace OpenSim.Region.Framework.Scenes
683 if (updatedTerrainTextures) 682 if (updatedTerrainTextures)
684 rs.Save(); 683 rs.Save();
685 684
686 m_regInfo.RegionSettings = rs; 685 RegionInfo.RegionSettings = rs;
687 686
688 if (estateDataService != null) 687 if (estateDataService != null)
689 m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false); 688 RegionInfo.EstateSettings = estateDataService.LoadEstateSettings(RegionInfo.RegionID, false);
690 689
691 #endregion Region Settings 690 #endregion Region Settings
692 691
@@ -861,7 +860,7 @@ namespace OpenSim.Region.Framework.Scenes
861 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 860 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
862 } 861 }
863 862
864 public Scene(RegionInfo regInfo) 863 public Scene(RegionInfo regInfo) : base(regInfo)
865 { 864 {
866 PhysicalPrims = true; 865 PhysicalPrims = true;
867 CollidablePrims = true; 866 CollidablePrims = true;
@@ -888,7 +887,6 @@ namespace OpenSim.Region.Framework.Scenes
888 WestBorders.Add(westBorder); 887 WestBorders.Add(westBorder);
889 BordersLocked = false; 888 BordersLocked = false;
890 889
891 m_regInfo = regInfo;
892 m_eventManager = new EventManager(); 890 m_eventManager = new EventManager();
893 891
894 m_permissions = new ScenePermissions(this); 892 m_permissions = new ScenePermissions(this);
@@ -1232,8 +1230,8 @@ namespace OpenSim.Region.Framework.Scenes
1232 1230
1233 m_sceneGraph.Close(); 1231 m_sceneGraph.Close();
1234 1232
1235 if (!GridService.DeregisterRegion(m_regInfo.RegionID)) 1233 if (!GridService.DeregisterRegion(RegionInfo.RegionID))
1236 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName); 1234 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name);
1237 1235
1238 // call the base class Close method. 1236 // call the base class Close method.
1239 base.Close(); 1237 base.Close();
@@ -1770,14 +1768,14 @@ namespace OpenSim.Region.Framework.Scenes
1770 1768
1771 public void StoreWindlightProfile(RegionLightShareData wl) 1769 public void StoreWindlightProfile(RegionLightShareData wl)
1772 { 1770 {
1773 m_regInfo.WindlightSettings = wl; 1771 RegionInfo.WindlightSettings = wl;
1774 SimulationDataService.StoreRegionWindlightSettings(wl); 1772 SimulationDataService.StoreRegionWindlightSettings(wl);
1775 m_eventManager.TriggerOnSaveNewWindlightProfile(); 1773 m_eventManager.TriggerOnSaveNewWindlightProfile();
1776 } 1774 }
1777 1775
1778 public void LoadWindlightProfile() 1776 public void LoadWindlightProfile()
1779 { 1777 {
1780 m_regInfo.WindlightSettings = SimulationDataService.LoadRegionWindlightSettings(RegionInfo.RegionID); 1778 RegionInfo.WindlightSettings = SimulationDataService.LoadRegionWindlightSettings(RegionInfo.RegionID);
1781 m_eventManager.TriggerOnSaveNewWindlightProfile(); 1779 m_eventManager.TriggerOnSaveNewWindlightProfile();
1782 } 1780 }
1783 1781
@@ -2318,7 +2316,7 @@ namespace OpenSim.Region.Framework.Scenes
2318 ForceSceneObjectBackup(so); 2316 ForceSceneObjectBackup(so);
2319 2317
2320 so.DetachFromBackup(); 2318 so.DetachFromBackup();
2321 SimulationDataService.RemoveObject(so.UUID, m_regInfo.RegionID); 2319 SimulationDataService.RemoveObject(so.UUID, RegionInfo.RegionID);
2322 } 2320 }
2323 2321
2324 // We need to keep track of this state in case this group is still queued for further backup. 2322 // We need to keep track of this state in case this group is still queued for further backup.
@@ -2662,7 +2660,7 @@ namespace OpenSim.Region.Framework.Scenes
2662 // enter. Period. 2660 // enter. Period.
2663 // 2661 //
2664 int flags = GetUserFlags(sceneObject.OwnerID); 2662 int flags = GetUserFlags(sceneObject.OwnerID);
2665 if (m_regInfo.EstateSettings.IsBanned(sceneObject.OwnerID, flags)) 2663 if (RegionInfo.EstateSettings.IsBanned(sceneObject.OwnerID, flags))
2666 { 2664 {
2667 m_log.InfoFormat("[INTERREGION]: Denied prim crossing for banned avatar {0}", sceneObject.OwnerID); 2665 m_log.InfoFormat("[INTERREGION]: Denied prim crossing for banned avatar {0}", sceneObject.OwnerID);
2668 2666
@@ -3908,9 +3906,9 @@ namespace OpenSim.Region.Framework.Scenes
3908 } 3906 }
3909 } 3907 }
3910 3908
3911 if (m_regInfo.EstateSettings != null) 3909 if (RegionInfo.EstateSettings != null)
3912 { 3910 {
3913 if (m_regInfo.EstateSettings.IsBanned(agent.AgentID,0)) 3911 if (RegionInfo.EstateSettings.IsBanned(agent.AgentID, 0))
3914 { 3912 {
3915 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", 3913 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
3916 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 3914 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
@@ -3942,7 +3940,7 @@ namespace OpenSim.Region.Framework.Scenes
3942 } 3940 }
3943 3941
3944 bool groupAccess = false; 3942 bool groupAccess = false;
3945 UUID[] estateGroups = m_regInfo.EstateSettings.EstateGroups; 3943 UUID[] estateGroups = RegionInfo.EstateSettings.EstateGroups;
3946 3944
3947 if (estateGroups != null) 3945 if (estateGroups != null)
3948 { 3946 {
@@ -3960,8 +3958,8 @@ namespace OpenSim.Region.Framework.Scenes
3960 m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!"); 3958 m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!");
3961 } 3959 }
3962 3960
3963 if (!m_regInfo.EstateSettings.PublicAccess && 3961 if (!RegionInfo.EstateSettings.PublicAccess &&
3964 !m_regInfo.EstateSettings.HasAccess(agent.AgentID) && 3962 !RegionInfo.EstateSettings.HasAccess(agent.AgentID) &&
3965 !groupAccess) 3963 !groupAccess)
3966 { 3964 {
3967 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", 3965 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate",
@@ -4034,7 +4032,7 @@ namespace OpenSim.Region.Framework.Scenes
4034// if (loggingOffUser != null) 4032// if (loggingOffUser != null)
4035// { 4033// {
4036// UUID localRegionSecret = UUID.Zero; 4034// UUID localRegionSecret = UUID.Zero;
4037// bool parsedsecret = UUID.TryParse(m_regInfo.regionSecret, out localRegionSecret); 4035// bool parsedsecret = UUID.TryParse(RegionInfo.regionSecret, out localRegionSecret);
4038// 4036//
4039// // Region Secret is used here in case a new sessionid overwrites an old one on the user server. 4037// // Region Secret is used here in case a new sessionid overwrites an old one on the user server.
4040// // Will update the user server in a few revisions to use it. 4038// // Will update the user server in a few revisions to use it.
@@ -4272,13 +4270,13 @@ namespace OpenSim.Region.Framework.Scenes
4272 ScenePresence sp = GetScenePresence(remoteClient.AgentId); 4270 ScenePresence sp = GetScenePresence(remoteClient.AgentId);
4273 if (sp != null) 4271 if (sp != null)
4274 { 4272 {
4275 uint regionX = m_regInfo.RegionLocX; 4273 uint regionX = RegionInfo.RegionLocX;
4276 uint regionY = m_regInfo.RegionLocY; 4274 uint regionY = RegionInfo.RegionLocY;
4277 4275
4278 Utils.LongToUInts(regionHandle, out regionX, out regionY); 4276 Utils.LongToUInts(regionHandle, out regionX, out regionY);
4279 4277
4280 int shiftx = (int) regionX - (int) m_regInfo.RegionLocX * (int)Constants.RegionSize; 4278 int shiftx = (int) regionX - (int) RegionInfo.RegionLocX * (int)Constants.RegionSize;
4281 int shifty = (int) regionY - (int) m_regInfo.RegionLocY * (int)Constants.RegionSize; 4279 int shifty = (int) regionY - (int) RegionInfo.RegionLocY * (int)Constants.RegionSize;
4282 4280
4283 position.X += shiftx; 4281 position.X += shiftx;
4284 position.Y += shifty; 4282 position.Y += shifty;
@@ -4301,7 +4299,7 @@ namespace OpenSim.Region.Framework.Scenes
4301 4299
4302 if (!result) 4300 if (!result)
4303 { 4301 {
4304 regionHandle = m_regInfo.RegionHandle; 4302 regionHandle = RegionInfo.RegionHandle;
4305 } 4303 }
4306 else 4304 else
4307 { 4305 {
@@ -4807,7 +4805,7 @@ namespace OpenSim.Region.Framework.Scenes
4807 4805
4808 public void DeleteFromStorage(UUID uuid) 4806 public void DeleteFromStorage(UUID uuid)
4809 { 4807 {
4810 SimulationDataService.RemoveObject(uuid, m_regInfo.RegionID); 4808 SimulationDataService.RemoveObject(uuid, RegionInfo.RegionID);
4811 } 4809 }
4812 4810
4813 public int GetHealth(out int flags, out string message) 4811 public int GetHealth(out int flags, out string message)
@@ -5288,7 +5286,7 @@ Environment.Exit(1);
5288 IEstateDataService estateDataService = EstateDataService; 5286 IEstateDataService estateDataService = EstateDataService;
5289 if (estateDataService != null) 5287 if (estateDataService != null)
5290 { 5288 {
5291 m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false); 5289 RegionInfo.EstateSettings = estateDataService.LoadEstateSettings(RegionInfo.RegionID, false);
5292 TriggerEstateSunUpdate(); 5290 TriggerEstateSunUpdate();
5293 } 5291 }
5294 } 5292 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 9b8a3ae..e8134cd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -51,6 +51,8 @@ namespace OpenSim.Region.Framework.Scenes
51 #endregion 51 #endregion
52 52
53 #region Fields 53 #region Fields
54
55 public string Name { get { return RegionInfo.RegionName; } }
54 56
55 public IConfigSource Config 57 public IConfigSource Config
56 { 58 {
@@ -148,6 +150,11 @@ namespace OpenSim.Region.Framework.Scenes
148 150
149 #endregion 151 #endregion
150 152
153 public SceneBase(RegionInfo regInfo)
154 {
155 RegionInfo = regInfo;
156 }
157
151 #region Update Methods 158 #region Update Methods
152 159
153 /// <summary> 160 /// <summary>
@@ -211,10 +218,7 @@ namespace OpenSim.Region.Framework.Scenes
211 /// 218 ///
212 /// </summary> 219 /// </summary>
213 /// <returns></returns> 220 /// <returns></returns>
214 public virtual RegionInfo RegionInfo 221 public virtual RegionInfo RegionInfo { get; private set; }
215 {
216 get { return m_regInfo; }
217 }
218 222
219 #region admin stuff 223 #region admin stuff
220 224