diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/GodController.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/GodController.cs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/GodController.cs b/OpenSim/Region/Framework/Scenes/GodController.cs index 7ed80f6..9372366 100644 --- a/OpenSim/Region/Framework/Scenes/GodController.cs +++ b/OpenSim/Region/Framework/Scenes/GodController.cs | |||
@@ -246,17 +246,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
246 | { | 246 | { |
247 | bool newstate = false; | 247 | bool newstate = false; |
248 | if(m_forceGodModeAlwaysOn) | 248 | if(m_forceGodModeAlwaysOn) |
249 | newstate = true; | 249 | newstate = m_viewergodlevel >= 200; |
250 | else | 250 | if(state != null) |
251 | { | 251 | { |
252 | if(state != null) | 252 | OSDMap s = (OSDMap)state; |
253 | { | ||
254 | OSDMap s = (OSDMap)state; | ||
255 | 253 | ||
256 | if (s.ContainsKey("ViewerUiIsGod")) | 254 | if (s.ContainsKey("ViewerUiIsGod")) |
257 | newstate = s["ViewerUiIsGod"].AsBoolean(); | 255 | newstate = s["ViewerUiIsGod"].AsBoolean(); |
258 | m_lastLevelToViewer = m_viewergodlevel; // we are not changing viewer level by default | 256 | m_lastLevelToViewer = m_viewergodlevel; // we are not changing viewer level by default |
259 | } | ||
260 | } | 257 | } |
261 | UpdateGodLevels(newstate); | 258 | UpdateGodLevels(newstate); |
262 | } | 259 | } |
@@ -264,6 +261,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
264 | public void HasMovedAway() | 261 | public void HasMovedAway() |
265 | { | 262 | { |
266 | m_lastLevelToViewer = 0; | 263 | m_lastLevelToViewer = 0; |
264 | if(m_forceGodModeAlwaysOn) | ||
265 | { | ||
266 | m_viewergodlevel = m_rightsGodLevel; | ||
267 | m_godlevel = m_rightsGodLevel; | ||
268 | } | ||
267 | } | 269 | } |
268 | 270 | ||
269 | public int UserLevel | 271 | public int UserLevel |