diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/GodController.cs | 1 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 147 |
3 files changed, 40 insertions, 113 deletions
diff --git a/OpenSim/Region/Framework/Scenes/GodController.cs b/OpenSim/Region/Framework/Scenes/GodController.cs index a3d0344..a0feca8 100644 --- a/OpenSim/Region/Framework/Scenes/GodController.cs +++ b/OpenSim/Region/Framework/Scenes/GodController.cs | |||
@@ -199,6 +199,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
199 | public int UserLevel | 199 | public int UserLevel |
200 | { | 200 | { |
201 | get { return m_userLevel; } | 201 | get { return m_userLevel; } |
202 | set { m_userLevel = UserLevel; } | ||
202 | } | 203 | } |
203 | 204 | ||
204 | public int GodLevel | 205 | public int GodLevel |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a293c92..87c3049 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -316,8 +316,6 @@ 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 | |||
321 | public bool SeeIntoRegion { get; set; } | 319 | public bool SeeIntoRegion { get; set; } |
322 | 320 | ||
323 | // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet; | 321 | // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet; |
@@ -1209,9 +1207,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1209 | 1207 | ||
1210 | #endregion Interest Management | 1208 | #endregion Interest Management |
1211 | 1209 | ||
1212 | AutomaticGodsOption = Util.GetConfigVarFromSections<bool>(config, "automatic_gods", | ||
1213 | new string[] { "Startup", "Permissions" }, true); | ||
1214 | |||
1215 | StatsReporter = new SimStatsReporter(this); | 1210 | StatsReporter = new SimStatsReporter(this); |
1216 | 1211 | ||
1217 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | 1212 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 58af347..339f1b1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -501,21 +501,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
501 | get { return m_invulnerable; } | 501 | get { return m_invulnerable; } |
502 | } | 502 | } |
503 | 503 | ||
504 | private int m_userLevel; | 504 | public GodController GodController { get; private set; } |
505 | |||
506 | public int UserLevel | ||
507 | { | ||
508 | get { return m_userLevel; } | ||
509 | private set { m_userLevel = value; } | ||
510 | } | ||
511 | |||
512 | private int m_godLevel; | ||
513 | |||
514 | public int GodLevel | ||
515 | { | ||
516 | get { return m_godLevel; } | ||
517 | private set { m_godLevel = value; } | ||
518 | } | ||
519 | 505 | ||
520 | private ulong m_rootRegionHandle; | 506 | private ulong m_rootRegionHandle; |
521 | private Vector3 m_rootRegionPosition = new Vector3(); | 507 | private Vector3 m_rootRegionPosition = new Vector3(); |
@@ -1056,21 +1042,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1056 | 1042 | ||
1057 | #region Constructor(s) | 1043 | #region Constructor(s) |
1058 | 1044 | ||
1059 | private void SetAutoGod() | ||
1060 | { | ||
1061 | if(!isNPC && m_scene.Permissions.IsGod(m_uuid)) | ||
1062 | { | ||
1063 | m_godLevel = 200; | ||
1064 | if(m_godLevel < UserLevel) | ||
1065 | m_godLevel = UserLevel; | ||
1066 | else | ||
1067 | m_godLevel = 0; | ||
1068 | } | ||
1069 | } | ||
1070 | |||
1071 | public ScenePresence( | 1045 | public ScenePresence( |
1072 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 1046 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
1073 | { | 1047 | { |
1048 | GodController = new GodController(world, this); | ||
1049 | |||
1074 | m_scene = world; | 1050 | m_scene = world; |
1075 | AttachmentsSyncLock = new Object(); | 1051 | AttachmentsSyncLock = new Object(); |
1076 | AllowMovement = true; | 1052 | AllowMovement = true; |
@@ -1097,15 +1073,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1097 | m_userFlags = 0; | 1073 | m_userFlags = 0; |
1098 | 1074 | ||
1099 | if (account != null) | 1075 | if (account != null) |
1100 | UserLevel = account.UserLevel; | 1076 | GodController.UserLevel = account.UserLevel; |
1101 | |||
1102 | if(!isNPC && m_scene.AutomaticGodsOption) | ||
1103 | { | ||
1104 | if(m_scene.Permissions.IsGod(m_uuid)) | ||
1105 | m_godLevel = 200; | ||
1106 | if(m_godLevel < UserLevel) | ||
1107 | m_godLevel = UserLevel; | ||
1108 | } | ||
1109 | 1077 | ||
1110 | // IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); | 1078 | // IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); |
1111 | // if (gm != null) | 1079 | // if (gm != null) |
@@ -2152,8 +2120,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2152 | 2120 | ||
2153 | if(!IsChildAgent && !isNPC) | 2121 | if(!IsChildAgent && !isNPC) |
2154 | 2122 | ||
2155 | ControllingClient.SendAdminResponse(UUID.Zero, (uint)GodLevel); | ||
2156 | |||
2157 | // start sending terrain patchs | 2123 | // start sending terrain patchs |
2158 | if (!gotCrossUpdate && !isNPC) | 2124 | if (!gotCrossUpdate && !isNPC) |
2159 | Scene.SendLayerData(ControllingClient); | 2125 | Scene.SendLayerData(ControllingClient); |
@@ -2226,7 +2192,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2226 | if (p == this) | 2192 | if (p == this) |
2227 | continue; | 2193 | continue; |
2228 | 2194 | ||
2229 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 2195 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
2230 | continue; | 2196 | continue; |
2231 | 2197 | ||
2232 | SendAppearanceToAgentNF(p); | 2198 | SendAppearanceToAgentNF(p); |
@@ -2276,7 +2242,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2276 | continue; | 2242 | continue; |
2277 | } | 2243 | } |
2278 | 2244 | ||
2279 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 2245 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
2280 | continue; | 2246 | continue; |
2281 | 2247 | ||
2282 | SendAttachmentsToAgentNF(p); | 2248 | SendAttachmentsToAgentNF(p); |
@@ -3892,7 +3858,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3892 | if (!remoteClient.IsActive) | 3858 | if (!remoteClient.IsActive) |
3893 | return; | 3859 | return; |
3894 | 3860 | ||
3895 | if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && p.GodLevel < 200) | 3861 | if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && p.GodController.GodLevel < 200) |
3896 | return; | 3862 | return; |
3897 | 3863 | ||
3898 | //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); | 3864 | //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); |
@@ -4002,7 +3968,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4002 | // get the avatar, then a kill if can't see it | 3968 | // get the avatar, then a kill if can't see it |
4003 | p.SendInitialAvatarDataToAgent(this); | 3969 | p.SendInitialAvatarDataToAgent(this); |
4004 | 3970 | ||
4005 | if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodLevel < 200) | 3971 | if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodController.GodLevel < 200) |
4006 | return; | 3972 | return; |
4007 | 3973 | ||
4008 | p.SendAppearanceToAgentNF(this); | 3974 | p.SendAppearanceToAgentNF(this); |
@@ -4050,7 +4016,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4050 | foreach (ScenePresence p in presences) | 4016 | foreach (ScenePresence p in presences) |
4051 | { | 4017 | { |
4052 | p.ControllingClient.SendAvatarDataImmediate(this); | 4018 | p.ControllingClient.SendAvatarDataImmediate(this); |
4053 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4019 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4054 | // either just kill the object | 4020 | // either just kill the object |
4055 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | 4021 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); |
4056 | // or also attachments viewer may still know about | 4022 | // or also attachments viewer may still know about |
@@ -4063,7 +4029,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4063 | public void SendInitialAvatarDataToAgent(ScenePresence p) | 4029 | public void SendInitialAvatarDataToAgent(ScenePresence p) |
4064 | { | 4030 | { |
4065 | p.ControllingClient.SendAvatarDataImmediate(this); | 4031 | p.ControllingClient.SendAvatarDataImmediate(this); |
4066 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4032 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4067 | // either just kill the object | 4033 | // either just kill the object |
4068 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | 4034 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); |
4069 | // or also attachments viewer may still know about | 4035 | // or also attachments viewer may still know about |
@@ -4077,7 +4043,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4077 | public void SendAvatarDataToAgent(ScenePresence avatar) | 4043 | public void SendAvatarDataToAgent(ScenePresence avatar) |
4078 | { | 4044 | { |
4079 | //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID); | 4045 | //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID); |
4080 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodLevel < 200) | 4046 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodController.GodLevel < 200) |
4081 | return; | 4047 | return; |
4082 | avatar.ControllingClient.SendAvatarDataImmediate(this); | 4048 | avatar.ControllingClient.SendAvatarDataImmediate(this); |
4083 | } | 4049 | } |
@@ -4122,7 +4088,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4122 | { | 4088 | { |
4123 | // m_log.DebugFormat( | 4089 | // m_log.DebugFormat( |
4124 | // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); | 4090 | // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); |
4125 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodLevel < 200) | 4091 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodController.GodLevel < 200) |
4126 | return; | 4092 | return; |
4127 | SendAppearanceToAgentNF(avatar); | 4093 | SendAppearanceToAgentNF(avatar); |
4128 | } | 4094 | } |
@@ -4138,7 +4104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4138 | if (IsChildAgent || Animator == null) | 4104 | if (IsChildAgent || Animator == null) |
4139 | return; | 4105 | return; |
4140 | 4106 | ||
4141 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4107 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4142 | return; | 4108 | return; |
4143 | 4109 | ||
4144 | Animator.SendAnimPackToClient(p.ControllingClient); | 4110 | Animator.SendAnimPackToClient(p.ControllingClient); |
@@ -4149,7 +4115,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4149 | if (IsChildAgent) | 4115 | if (IsChildAgent) |
4150 | return; | 4116 | return; |
4151 | 4117 | ||
4152 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4118 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4153 | return; | 4119 | return; |
4154 | 4120 | ||
4155 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); | 4121 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); |
@@ -4174,7 +4140,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4174 | 4140 | ||
4175 | m_scene.ForEachScenePresence(delegate(ScenePresence p) | 4141 | m_scene.ForEachScenePresence(delegate(ScenePresence p) |
4176 | { | 4142 | { |
4177 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4143 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4178 | return; | 4144 | return; |
4179 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); | 4145 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); |
4180 | }); | 4146 | }); |
@@ -4287,7 +4253,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4287 | agentpos.Position = AbsolutePosition; | 4253 | agentpos.Position = AbsolutePosition; |
4288 | agentpos.Velocity = Velocity; | 4254 | agentpos.Velocity = Velocity; |
4289 | agentpos.RegionHandle = RegionHandle; | 4255 | agentpos.RegionHandle = RegionHandle; |
4290 | agentpos.GodLevel = GodLevel; | 4256 | agentpos.GodData = GodController.State(); |
4291 | agentpos.Throttles = ControllingClient.GetThrottlesPacked(1); | 4257 | agentpos.Throttles = ControllingClient.GetThrottlesPacked(1); |
4292 | 4258 | ||
4293 | // Let's get this out of the update loop | 4259 | // Let's get this out of the update loop |
@@ -4536,23 +4502,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
4536 | /// </summary> | 4502 | /// </summary> |
4537 | public void GrantGodlikePowers(UUID token, bool godStatus) | 4503 | public void GrantGodlikePowers(UUID token, bool godStatus) |
4538 | { | 4504 | { |
4539 | // if(m_scene.AutomaticGodsOption) | 4505 | if (isNPC) |
4540 | // return; | 4506 | return; |
4541 | |||
4542 | int oldgodlevel = GodLevel; | ||
4543 | |||
4544 | if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) | ||
4545 | { | ||
4546 | GodLevel = 200; | ||
4547 | if(GodLevel < UserLevel) | ||
4548 | GodLevel = UserLevel; | ||
4549 | } | ||
4550 | else | ||
4551 | GodLevel = 0; | ||
4552 | 4507 | ||
4553 | ControllingClient.SendAdminResponse(token, (uint)GodLevel); | 4508 | bool success = GodController.RequestGodMode(godStatus); |
4554 | if(oldgodlevel != GodLevel) | 4509 | if (success && godStatus) |
4555 | parcelGodCheck(m_currentParcelUUID, GodLevel >= 200); | 4510 | parcelGodCheck(m_currentParcelUUID, GodController.GodLevel >= 200); |
4556 | } | 4511 | } |
4557 | 4512 | ||
4558 | #region Child Agent Updates | 4513 | #region Child Agent Updates |
@@ -4583,6 +4538,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4583 | if (!IsChildAgent) | 4538 | if (!IsChildAgent) |
4584 | return; | 4539 | return; |
4585 | 4540 | ||
4541 | GodController.SetState(cAgentData.GodData); | ||
4542 | |||
4586 | RegionHandle = cAgentData.RegionHandle; | 4543 | RegionHandle = cAgentData.RegionHandle; |
4587 | 4544 | ||
4588 | //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); | 4545 | //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); |
@@ -4597,15 +4554,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4597 | m_pos = cAgentData.Position + offset; | 4554 | m_pos = cAgentData.Position + offset; |
4598 | 4555 | ||
4599 | CameraPosition = cAgentData.Center + offset; | 4556 | CameraPosition = cAgentData.Center + offset; |
4600 | if(m_scene.AutomaticGodsOption) | ||
4601 | SetAutoGod(); | ||
4602 | else | ||
4603 | { | ||
4604 | if(cAgentData.GodLevel >= 200 && m_scene.Permissions.IsGod(m_uuid)) | ||
4605 | GodLevel = cAgentData.GodLevel; | ||
4606 | else | ||
4607 | GodLevel = 0; | ||
4608 | } | ||
4609 | 4557 | ||
4610 | if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) | 4558 | if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) |
4611 | { | 4559 | { |
@@ -4665,15 +4613,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4665 | cAgent.HeadRotation = m_headrotation; | 4613 | cAgent.HeadRotation = m_headrotation; |
4666 | cAgent.BodyRotation = Rotation; | 4614 | cAgent.BodyRotation = Rotation; |
4667 | cAgent.ControlFlags = (uint)m_AgentControlFlags; | 4615 | cAgent.ControlFlags = (uint)m_AgentControlFlags; |
4668 | if(m_scene.AutomaticGodsOption) | ||
4669 | SetAutoGod(); | ||
4670 | else | ||
4671 | { | ||
4672 | if (GodLevel >= 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) | ||
4673 | cAgent.GodLevel = (byte)GodLevel; | ||
4674 | else | ||
4675 | cAgent.GodLevel = (byte) 0; | ||
4676 | } | ||
4677 | 4616 | ||
4678 | cAgent.AlwaysRun = SetAlwaysRun; | 4617 | cAgent.AlwaysRun = SetAlwaysRun; |
4679 | 4618 | ||
@@ -4735,6 +4674,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4735 | // "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()", | 4674 | // "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()", |
4736 | // Name, m_scene.RegionInfo.RegionName, m_callbackURI); | 4675 | // Name, m_scene.RegionInfo.RegionName, m_callbackURI); |
4737 | 4676 | ||
4677 | GodController.SetState(cAgent.GodData); | ||
4678 | |||
4738 | m_pos = cAgent.Position; | 4679 | m_pos = cAgent.Position; |
4739 | m_velocity = cAgent.Velocity; | 4680 | m_velocity = cAgent.Velocity; |
4740 | CameraPosition = cAgent.Center; | 4681 | CameraPosition = cAgent.Center; |
@@ -4771,16 +4712,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4771 | Rotation = cAgent.BodyRotation; | 4712 | Rotation = cAgent.BodyRotation; |
4772 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; | 4713 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; |
4773 | 4714 | ||
4774 | if(m_scene.AutomaticGodsOption) | ||
4775 | SetAutoGod(); | ||
4776 | else | ||
4777 | { | ||
4778 | if (cAgent.GodLevel >= 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) | ||
4779 | GodLevel = cAgent.GodLevel; | ||
4780 | else | ||
4781 | GodLevel = 0; | ||
4782 | } | ||
4783 | |||
4784 | SetAlwaysRun = cAgent.AlwaysRun; | 4715 | SetAlwaysRun = cAgent.AlwaysRun; |
4785 | 4716 | ||
4786 | Appearance = new AvatarAppearance(cAgent.Appearance); | 4717 | Appearance = new AvatarAppearance(cAgent.Appearance); |
@@ -5010,7 +4941,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5010 | RaiseCollisionScriptEvents(coldata); | 4941 | RaiseCollisionScriptEvents(coldata); |
5011 | 4942 | ||
5012 | // Gods do not take damage and Invulnerable is set depending on parcel/region flags | 4943 | // Gods do not take damage and Invulnerable is set depending on parcel/region flags |
5013 | if (Invulnerable || GodLevel > 0) | 4944 | if (Invulnerable || GodController.GodLevel > 0) |
5014 | return; | 4945 | return; |
5015 | 4946 | ||
5016 | // The following may be better in the ICombatModule | 4947 | // The following may be better in the ICombatModule |
@@ -5295,7 +5226,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5295 | if (p != this && sog.HasPrivateAttachmentPoint) | 5226 | if (p != this && sog.HasPrivateAttachmentPoint) |
5296 | return; | 5227 | return; |
5297 | 5228 | ||
5298 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5229 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5299 | return; | 5230 | return; |
5300 | 5231 | ||
5301 | SendTerseUpdateToAgentNF(p); | 5232 | SendTerseUpdateToAgentNF(p); |
@@ -5409,7 +5340,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5409 | if (p == this) | 5340 | if (p == this) |
5410 | continue; | 5341 | continue; |
5411 | 5342 | ||
5412 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5343 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5413 | continue; | 5344 | continue; |
5414 | 5345 | ||
5415 | p.ControllingClient.SendEntityUpdate(rootpart, rootflag); | 5346 | p.ControllingClient.SendEntityUpdate(rootpart, rootflag); |
@@ -5468,7 +5399,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5468 | if (p == this) | 5399 | if (p == this) |
5469 | continue; | 5400 | continue; |
5470 | 5401 | ||
5471 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5402 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5472 | continue; | 5403 | continue; |
5473 | 5404 | ||
5474 | p.ControllingClient.SendEntityUpdate(rootpart, flag); | 5405 | p.ControllingClient.SendEntityUpdate(rootpart, flag); |
@@ -5518,7 +5449,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5518 | if (p == this) | 5449 | if (p == this) |
5519 | continue; | 5450 | continue; |
5520 | 5451 | ||
5521 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5452 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5522 | continue; | 5453 | continue; |
5523 | 5454 | ||
5524 | p.ControllingClient.SendEntityUpdate(part, flag); | 5455 | p.ControllingClient.SendEntityUpdate(part, flag); |
@@ -5559,7 +5490,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5559 | { | 5490 | { |
5560 | if (p == this) | 5491 | if (p == this) |
5561 | continue; | 5492 | continue; |
5562 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5493 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5563 | continue; | 5494 | continue; |
5564 | 5495 | ||
5565 | p.ControllingClient.SendEntityUpdate(part, flag); | 5496 | p.ControllingClient.SendEntityUpdate(part, flag); |
@@ -6197,7 +6128,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6197 | // the TP point. This behaviour mimics agni. | 6128 | // the TP point. This behaviour mimics agni. |
6198 | if (land.LandData.LandingType == (byte)LandingType.LandingPoint && | 6129 | if (land.LandData.LandingType == (byte)LandingType.LandingPoint && |
6199 | land.LandData.UserLocation != Vector3.Zero && | 6130 | land.LandData.UserLocation != Vector3.Zero && |
6200 | GodLevel < 200 && | 6131 | GodController.GodLevel < 200 && |
6201 | ((land.LandData.OwnerID != m_uuid && | 6132 | ((land.LandData.OwnerID != m_uuid && |
6202 | !m_scene.Permissions.IsGod(m_uuid) && | 6133 | !m_scene.Permissions.IsGod(m_uuid) && |
6203 | !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || | 6134 | !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || |
@@ -6222,7 +6153,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6222 | string reason; | 6153 | string reason; |
6223 | 6154 | ||
6224 | // dont mess with gods | 6155 | // dont mess with gods |
6225 | if(GodLevel >= 200 || m_scene.Permissions.IsGod(m_uuid)) | 6156 | if(GodController.GodLevel >= 200 || m_scene.Permissions.IsGod(m_uuid)) |
6226 | return true; | 6157 | return true; |
6227 | 6158 | ||
6228 | // respect region owner and managers | 6159 | // respect region owner and managers |
@@ -6570,7 +6501,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6570 | continue; | 6501 | continue; |
6571 | 6502 | ||
6572 | // those not on parcel dont see me | 6503 | // those not on parcel dont see me |
6573 | if (currentParcelID != p.currentParcelUUID && p.GodLevel < 200) | 6504 | if (currentParcelID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
6574 | { | 6505 | { |
6575 | killsToSendto.Add(p); // they dont see me | 6506 | killsToSendto.Add(p); // they dont see me |
6576 | } | 6507 | } |
@@ -6596,9 +6527,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
6596 | // only those on previus parcel need receive kills | 6527 | // only those on previus parcel need receive kills |
6597 | if (previusParcelID == p.currentParcelUUID) | 6528 | if (previusParcelID == p.currentParcelUUID) |
6598 | { | 6529 | { |
6599 | if(p.GodLevel < 200) | 6530 | if(p.GodController.GodLevel < 200) |
6600 | killsToSendto.Add(p); // they dont see me | 6531 | killsToSendto.Add(p); // they dont see me |
6601 | if(GodLevel < 200) | 6532 | if(GodController.GodLevel < 200) |
6602 | killsToSendme.Add(p); // i dont see them | 6533 | killsToSendme.Add(p); // i dont see them |
6603 | } | 6534 | } |
6604 | // only those on new parcel need see | 6535 | // only those on new parcel need see |
@@ -6620,7 +6551,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6620 | continue; | 6551 | continue; |
6621 | 6552 | ||
6622 | // those not on new parcel dont see me | 6553 | // those not on new parcel dont see me |
6623 | if (currentParcelID != p.currentParcelUUID && p.GodLevel < 200) | 6554 | if (currentParcelID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
6624 | { | 6555 | { |
6625 | killsToSendto.Add(p); // they dont see me | 6556 | killsToSendto.Add(p); // they dont see me |
6626 | } | 6557 | } |
@@ -6646,7 +6577,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6646 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) | 6577 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) |
6647 | continue; | 6578 | continue; |
6648 | // only those old parcel need kills | 6579 | // only those old parcel need kills |
6649 | if (previusParcelID == p.currentParcelUUID && GodLevel < 200) | 6580 | if (previusParcelID == p.currentParcelUUID && GodController.GodLevel < 200) |
6650 | { | 6581 | { |
6651 | killsToSendme.Add(p); // i dont see them | 6582 | killsToSendme.Add(p); // i dont see them |
6652 | } | 6583 | } |
@@ -6709,7 +6640,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6709 | if (Scene.AttachmentsModule != null) | 6640 | if (Scene.AttachmentsModule != null) |
6710 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | 6641 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); |
6711 | 6642 | ||
6712 | if (!ParcelHideThisAvatar || GodLevel >= 200) | 6643 | if (!ParcelHideThisAvatar || GodController.GodLevel >= 200) |
6713 | return; | 6644 | return; |
6714 | 6645 | ||
6715 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | 6646 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); |