aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/GodController.cs16
1 files changed, 7 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/GodController.cs b/OpenSim/Region/Framework/Scenes/GodController.cs
index 5146ea0..7672062 100644
--- a/OpenSim/Region/Framework/Scenes/GodController.cs
+++ b/OpenSim/Region/Framework/Scenes/GodController.cs
@@ -124,26 +124,24 @@ namespace OpenSim.Region.Framework.Scenes
124 124
125 protected bool CanBeGod() 125 protected bool CanBeGod()
126 { 126 {
127 bool canBeGod = false;
128
129 if (m_allowGridGods && m_userLevel > 0) 127 if (m_allowGridGods && m_userLevel > 0)
130 canBeGod = true; 128 return true;
131 129
132 if (m_regionOwnerIsGod && m_scene.RegionInfo.EstateSettings.IsEstateOwner(m_scenePresence.UUID)) 130 if (m_regionOwnerIsGod && m_scene.RegionInfo.EstateSettings.IsEstateOwner(m_scenePresence.UUID))
133 canBeGod = true; 131 return true;
134 132
135 if (m_regionManagerIsGod && m_scene.Permissions.IsEstateManager(m_scenePresence.UUID)) 133 if (m_regionManagerIsGod && m_scene.Permissions.IsEstateManager(m_scenePresence.UUID))
136 canBeGod = true; 134 return true;
137 135
138 if (!canBeGod && m_parcelOwnerIsGod) // Skip expensive check if we're already god! 136 if (m_parcelOwnerIsGod) // Skip expensive check if we're already god!
139 { 137 {
140 Vector3 pos = m_scenePresence.AbsolutePosition; 138 Vector3 pos = m_scenePresence.AbsolutePosition;
141 ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); 139 ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
142 if (parcel != null && parcel.LandData.OwnerID == m_scenePresence.UUID) 140 if (parcel != null && parcel.LandData.OwnerID == m_scenePresence.UUID)
143 canBeGod = true; 141 return true;
144 } 142 }
145 143
146 return canBeGod; 144 return false;
147 } 145 }
148 146
149 public void SyncViewerState() 147 public void SyncViewerState()
@@ -211,7 +209,7 @@ namespace OpenSim.Region.Framework.Scenes
211 public int UserLevel 209 public int UserLevel
212 { 210 {
213 get { return m_userLevel; } 211 get { return m_userLevel; }
214 set { m_userLevel = UserLevel; } 212 set { m_userLevel = value; }
215 } 213 }
216 214
217 public int GodLevel 215 public int GodLevel