try to improve option automatic_gods processing

0.9.0-post-fixes
UbitUmarov 2017-01-08 12:30:50 +00:00
parent da69bc5da6
commit 90dee2fce6
1 changed files with 11 additions and 9 deletions

View File

@ -246,17 +246,14 @@ namespace OpenSim.Region.Framework.Scenes
{
bool newstate = false;
if(m_forceGodModeAlwaysOn)
newstate = true;
else
newstate = m_viewergodlevel >= 200;
if(state != null)
{
if(state != null)
{
OSDMap s = (OSDMap)state;
OSDMap s = (OSDMap)state;
if (s.ContainsKey("ViewerUiIsGod"))
newstate = s["ViewerUiIsGod"].AsBoolean();
m_lastLevelToViewer = m_viewergodlevel; // we are not changing viewer level by default
}
if (s.ContainsKey("ViewerUiIsGod"))
newstate = s["ViewerUiIsGod"].AsBoolean();
m_lastLevelToViewer = m_viewergodlevel; // we are not changing viewer level by default
}
UpdateGodLevels(newstate);
}
@ -264,6 +261,11 @@ namespace OpenSim.Region.Framework.Scenes
public void HasMovedAway()
{
m_lastLevelToViewer = 0;
if(m_forceGodModeAlwaysOn)
{
m_viewergodlevel = m_rightsGodLevel;
m_godlevel = m_rightsGodLevel;
}
}
public int UserLevel