aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs5
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs1
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs42
4 files changed, 43 insertions, 9 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 0e5eaf2..03ead01 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -89,6 +89,7 @@ namespace OpenSim.Framework
89 public Vector3 AtAxis; 89 public Vector3 AtAxis;
90 public Vector3 LeftAxis; 90 public Vector3 LeftAxis;
91 public Vector3 UpAxis; 91 public Vector3 UpAxis;
92 public int GodLevel;
92 public bool ChangedGrid; 93 public bool ChangedGrid;
93 94
94 // This probably shouldn't be here 95 // This probably shouldn't be here
@@ -116,6 +117,7 @@ namespace OpenSim.Framework
116 117
117 args["far"] = OSD.FromReal(Far); 118 args["far"] = OSD.FromReal(Far);
118 args["changed_grid"] = OSD.FromBoolean(ChangedGrid); 119 args["changed_grid"] = OSD.FromBoolean(ChangedGrid);
120 args["god_level"] = OSD.FromString(GodLevel.ToString());
119 121
120 if ((Throttles != null) && (Throttles.Length > 0)) 122 if ((Throttles != null) && (Throttles.Length > 0))
121 args["throttles"] = OSD.FromBinary(Throttles); 123 args["throttles"] = OSD.FromBinary(Throttles);
@@ -174,6 +176,9 @@ namespace OpenSim.Framework
174 if (args["changed_grid"] != null) 176 if (args["changed_grid"] != null)
175 ChangedGrid = args["changed_grid"].AsBoolean(); 177 ChangedGrid = args["changed_grid"].AsBoolean();
176 178
179 if (args["god_level"] != null)
180 Int32.TryParse(args["god_level"].AsString(), out GodLevel);
181
177 if (args["far"] != null) 182 if (args["far"] != null)
178 Far = (float)(args["far"].AsReal()); 183 Far = (float)(args["far"].AsReal());
179 184
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 6b1eb54..ebebfd0 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -2077,6 +2077,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2077 agentpos.Position = sp.AbsolutePosition; 2077 agentpos.Position = sp.AbsolutePosition;
2078 agentpos.Velocity = sp.Velocity; 2078 agentpos.Velocity = sp.Velocity;
2079 agentpos.RegionHandle = currentRegionHandler; 2079 agentpos.RegionHandle = currentRegionHandler;
2080 agentpos.GodLevel = sp.GodLevel;
2080 agentpos.Throttles = spClient.GetThrottlesPacked(1); 2081 agentpos.Throttles = spClient.GetThrottlesPacked(1);
2081 // agentpos.ChildrenCapSeeds = seeds; 2082 // agentpos.ChildrenCapSeeds = seeds;
2082 2083
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 352bc05..a293c92 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -316,6 +316,8 @@ namespace OpenSim.Region.Framework.Scenes
316 public bool m_seeIntoBannedRegion = false; 316 public bool m_seeIntoBannedRegion = false;
317 public int MaxUndoCount = 5; 317 public int MaxUndoCount = 5;
318 318
319 public bool AutomaticGodsOption {get; private set; }
320
319 public bool SeeIntoRegion { get; set; } 321 public bool SeeIntoRegion { get; set; }
320 322
321 // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet; 323 // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet;
@@ -1207,6 +1209,8 @@ namespace OpenSim.Region.Framework.Scenes
1207 1209
1208 #endregion Interest Management 1210 #endregion Interest Management
1209 1211
1212 AutomaticGodsOption = Util.GetConfigVarFromSections<bool>(config, "automatic_gods",
1213 new string[] { "Startup", "Permissions" }, true);
1210 1214
1211 StatsReporter = new SimStatsReporter(this); 1215 StatsReporter = new SimStatsReporter(this);
1212 1216
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 29e139b..c8d28f9 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1087,6 +1087,14 @@ namespace OpenSim.Region.Framework.Scenes
1087 if (account != null) 1087 if (account != null)
1088 UserLevel = account.UserLevel; 1088 UserLevel = account.UserLevel;
1089 1089
1090 if(!isNPC && m_scene.AutomaticGodsOption && m_scene.Permissions != null)
1091 {
1092 if(m_scene.Permissions.IsGod(m_uuid))
1093 m_godLevel = 200;
1094 if(m_godLevel < UserLevel)
1095 m_godLevel = UserLevel;
1096 }
1097
1090 // IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); 1098 // IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
1091 // if (gm != null) 1099 // if (gm != null)
1092 // Grouptitle = gm.GetGroupTitle(m_uuid); 1100 // Grouptitle = gm.GetGroupTitle(m_uuid);
@@ -4262,6 +4270,7 @@ namespace OpenSim.Region.Framework.Scenes
4262 agentpos.Position = AbsolutePosition; 4270 agentpos.Position = AbsolutePosition;
4263 agentpos.Velocity = Velocity; 4271 agentpos.Velocity = Velocity;
4264 agentpos.RegionHandle = RegionHandle; 4272 agentpos.RegionHandle = RegionHandle;
4273 agentpos.GodLevel = GodLevel;
4265 agentpos.Throttles = ControllingClient.GetThrottlesPacked(1); 4274 agentpos.Throttles = ControllingClient.GetThrottlesPacked(1);
4266 4275
4267 // Let's get this out of the update loop 4276 // Let's get this out of the update loop
@@ -4510,6 +4519,9 @@ namespace OpenSim.Region.Framework.Scenes
4510 /// </summary> 4519 /// </summary>
4511 public void GrantGodlikePowers(UUID token, bool godStatus) 4520 public void GrantGodlikePowers(UUID token, bool godStatus)
4512 { 4521 {
4522 if(m_scene.AutomaticGodsOption)
4523 return;
4524
4513 int oldgodlevel = GodLevel; 4525 int oldgodlevel = GodLevel;
4514 4526
4515 if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) 4527 if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID))
@@ -4568,6 +4580,13 @@ namespace OpenSim.Region.Framework.Scenes
4568 m_pos = cAgentData.Position + offset; 4580 m_pos = cAgentData.Position + offset;
4569 4581
4570 CameraPosition = cAgentData.Center + offset; 4582 CameraPosition = cAgentData.Center + offset;
4583 if(!m_scene.AutomaticGodsOption)
4584 {
4585 if(cAgentData.GodLevel >= 200 && m_scene.Permissions.IsGod(m_uuid))
4586 GodLevel = cAgentData.GodLevel;
4587 else
4588 GodLevel = 0;
4589 }
4571 4590
4572 if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) 4591 if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0)
4573 { 4592 {
@@ -4627,11 +4646,13 @@ namespace OpenSim.Region.Framework.Scenes
4627 cAgent.HeadRotation = m_headrotation; 4646 cAgent.HeadRotation = m_headrotation;
4628 cAgent.BodyRotation = Rotation; 4647 cAgent.BodyRotation = Rotation;
4629 cAgent.ControlFlags = (uint)m_AgentControlFlags; 4648 cAgent.ControlFlags = (uint)m_AgentControlFlags;
4630 4649 if(!m_scene.AutomaticGodsOption)
4631 if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) 4650 {
4632 cAgent.GodLevel = (byte)GodLevel; 4651 if (GodLevel >= 200 && m_scene.Permissions.IsGod(cAgent.AgentID))
4633 else 4652 cAgent.GodLevel = (byte)GodLevel;
4634 cAgent.GodLevel = (byte) 0; 4653 else
4654 cAgent.GodLevel = (byte) 0;
4655 }
4635 4656
4636 cAgent.AlwaysRun = SetAlwaysRun; 4657 cAgent.AlwaysRun = SetAlwaysRun;
4637 4658
@@ -4729,10 +4750,13 @@ namespace OpenSim.Region.Framework.Scenes
4729 Rotation = cAgent.BodyRotation; 4750 Rotation = cAgent.BodyRotation;
4730 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; 4751 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags;
4731 4752
4732 if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID)) 4753 if(!m_scene.AutomaticGodsOption)
4733 GodLevel = cAgent.GodLevel; 4754 {
4734 else 4755 if (cAgent.GodLevel >= 200 && m_scene.Permissions.IsGod(cAgent.AgentID))
4735 GodLevel = 0; 4756 GodLevel = cAgent.GodLevel;
4757 else
4758 GodLevel = 0;
4759 }
4736 4760
4737 SetAlwaysRun = cAgent.AlwaysRun; 4761 SetAlwaysRun = cAgent.AlwaysRun;
4738 4762