diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/GodController.cs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/GodController.cs b/OpenSim/Region/Framework/Scenes/GodController.cs index 95fdc02..5146ea0 100644 --- a/OpenSim/Region/Framework/Scenes/GodController.cs +++ b/OpenSim/Region/Framework/Scenes/GodController.cs | |||
@@ -113,6 +113,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
113 | 113 | ||
114 | } | 114 | } |
115 | 115 | ||
116 | protected int PotentialGodLevel() | ||
117 | { | ||
118 | int godLevel = m_allowGridGods ? m_userLevel : 200; | ||
119 | if ((!m_forceGridGods) && m_userLevel < 200) | ||
120 | godLevel = 200; | ||
121 | |||
122 | return godLevel; | ||
123 | } | ||
124 | |||
116 | protected bool CanBeGod() | 125 | protected bool CanBeGod() |
117 | { | 126 | { |
118 | bool canBeGod = false; | 127 | bool canBeGod = false; |
@@ -143,9 +152,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
143 | 152 | ||
144 | bool shoudBeGod = m_forceGodModeAlwaysOn ? canBeGod : (m_viewerUiIsGod && canBeGod); | 153 | bool shoudBeGod = m_forceGodModeAlwaysOn ? canBeGod : (m_viewerUiIsGod && canBeGod); |
145 | 154 | ||
146 | int godLevel = m_allowGridGods ? m_userLevel : 200; | 155 | int godLevel = PotentialGodLevel(); |
147 | if ((!m_forceGridGods) && m_userLevel < 200) | ||
148 | godLevel = 200; | ||
149 | 156 | ||
150 | if (!shoudBeGod) | 157 | if (!shoudBeGod) |
151 | godLevel = 0; | 158 | godLevel = 0; |
@@ -172,7 +179,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
172 | if (!CanBeGod()) | 179 | if (!CanBeGod()) |
173 | return false; | 180 | return false; |
174 | 181 | ||
175 | int godLevel = m_allowGridGods ? m_userLevel : 200; | 182 | int godLevel = PotentialGodLevel(); |
176 | 183 | ||
177 | if (!m_viewerUiIsGod) | 184 | if (!m_viewerUiIsGod) |
178 | m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, (uint)godLevel); | 185 | m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, (uint)godLevel); |
@@ -211,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
211 | { | 218 | { |
212 | get | 219 | get |
213 | { | 220 | { |
214 | int godLevel = m_allowGridGods ? m_userLevel : 200; | 221 | int godLevel = PotentialGodLevel(); |
215 | if (!m_viewerUiIsGod) | 222 | if (!m_viewerUiIsGod) |
216 | godLevel = 0; | 223 | godLevel = 0; |
217 | 224 | ||
@@ -223,7 +230,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
223 | { | 230 | { |
224 | get | 231 | get |
225 | { | 232 | { |
226 | int godLevel = m_allowGridGods ? m_userLevel : 200; | 233 | int godLevel = PotentialGodLevel(); |
227 | if (m_viewerUiIsGod) | 234 | if (m_viewerUiIsGod) |
228 | return godLevel; | 235 | return godLevel; |
229 | 236 | ||