aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-06 02:14:56 +0000
committerMelanie Thielker2017-01-06 02:14:56 +0000
commit8eb7c9d0fbd0804c186a086c531dd88fd23ba0b5 (patch)
tree79685366ed900d3260c17510865498807d28ca43
parentMerge branch 'master' of opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-8eb7c9d0fbd0804c186a086c531dd88fd23ba0b5.zip
opensim-SC-8eb7c9d0fbd0804c186a086c531dd88fd23ba0b5.tar.gz
opensim-SC-8eb7c9d0fbd0804c186a086c531dd88fd23ba0b5.tar.bz2
opensim-SC-8eb7c9d0fbd0804c186a086c531dd88fd23ba0b5.tar.xz
Fix the mixed gods issue in all places
-rw-r--r--OpenSim/Region/Framework/Scenes/GodController.cs19
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