diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 122 |
1 files changed, 50 insertions, 72 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 29e139b..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(); |
@@ -1059,6 +1045,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1059 | public ScenePresence( | 1045 | public ScenePresence( |
1060 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 1046 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
1061 | { | 1047 | { |
1048 | GodController = new GodController(world, this); | ||
1049 | |||
1062 | m_scene = world; | 1050 | m_scene = world; |
1063 | AttachmentsSyncLock = new Object(); | 1051 | AttachmentsSyncLock = new Object(); |
1064 | AllowMovement = true; | 1052 | AllowMovement = true; |
@@ -1085,7 +1073,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1085 | m_userFlags = 0; | 1073 | m_userFlags = 0; |
1086 | 1074 | ||
1087 | if (account != null) | 1075 | if (account != null) |
1088 | UserLevel = account.UserLevel; | 1076 | GodController.UserLevel = account.UserLevel; |
1089 | 1077 | ||
1090 | // IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); | 1078 | // IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); |
1091 | // if (gm != null) | 1079 | // if (gm != null) |
@@ -2113,18 +2101,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
2113 | 2101 | ||
2114 | m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2102 | m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2115 | 2103 | ||
2116 | 2104 | if(m_teleportFlags > 0) | |
2117 | if(m_teleportFlags > 0) //sanity check | 2105 | { |
2118 | gotCrossUpdate = false; | 2106 | gotCrossUpdate = false; // sanity check |
2107 | Thread.Sleep(500); // let viewers catch us | ||
2108 | } | ||
2119 | 2109 | ||
2120 | if(!gotCrossUpdate) | 2110 | if(!gotCrossUpdate) |
2121 | RotateToLookAt(look); | 2111 | RotateToLookAt(look); |
2122 | 2112 | ||
2123 | |||
2124 | // start sending terrain patchs | ||
2125 | if (!gotCrossUpdate && !isNPC) | ||
2126 | Scene.SendLayerData(ControllingClient); | ||
2127 | |||
2128 | // HG | 2113 | // HG |
2129 | bool isHGTP = (m_teleportFlags & TeleportFlags.ViaHGLogin) != 0; | 2114 | bool isHGTP = (m_teleportFlags & TeleportFlags.ViaHGLogin) != 0; |
2130 | if(isHGTP) | 2115 | if(isHGTP) |
@@ -2133,6 +2118,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2133 | m_log.DebugFormat("[CompleteMovement] HG"); | 2118 | m_log.DebugFormat("[CompleteMovement] HG"); |
2134 | } | 2119 | } |
2135 | 2120 | ||
2121 | if(!IsChildAgent && !isNPC) | ||
2122 | |||
2123 | // start sending terrain patchs | ||
2124 | if (!gotCrossUpdate && !isNPC) | ||
2125 | Scene.SendLayerData(ControllingClient); | ||
2126 | |||
2136 | m_previusParcelHide = false; | 2127 | m_previusParcelHide = false; |
2137 | m_previusParcelUUID = UUID.Zero; | 2128 | m_previusParcelUUID = UUID.Zero; |
2138 | m_currentParcelHide = false; | 2129 | m_currentParcelHide = false; |
@@ -2201,7 +2192,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2201 | if (p == this) | 2192 | if (p == this) |
2202 | continue; | 2193 | continue; |
2203 | 2194 | ||
2204 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 2195 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
2205 | continue; | 2196 | continue; |
2206 | 2197 | ||
2207 | SendAppearanceToAgentNF(p); | 2198 | SendAppearanceToAgentNF(p); |
@@ -2251,7 +2242,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2251 | continue; | 2242 | continue; |
2252 | } | 2243 | } |
2253 | 2244 | ||
2254 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 2245 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
2255 | continue; | 2246 | continue; |
2256 | 2247 | ||
2257 | SendAttachmentsToAgentNF(p); | 2248 | SendAttachmentsToAgentNF(p); |
@@ -3867,7 +3858,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3867 | if (!remoteClient.IsActive) | 3858 | if (!remoteClient.IsActive) |
3868 | return; | 3859 | return; |
3869 | 3860 | ||
3870 | if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && p.GodLevel < 200) | 3861 | if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && p.GodController.GodLevel < 200) |
3871 | return; | 3862 | return; |
3872 | 3863 | ||
3873 | //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); |
@@ -3977,7 +3968,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3977 | // get the avatar, then a kill if can't see it | 3968 | // get the avatar, then a kill if can't see it |
3978 | p.SendInitialAvatarDataToAgent(this); | 3969 | p.SendInitialAvatarDataToAgent(this); |
3979 | 3970 | ||
3980 | if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodLevel < 200) | 3971 | if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodController.GodLevel < 200) |
3981 | return; | 3972 | return; |
3982 | 3973 | ||
3983 | p.SendAppearanceToAgentNF(this); | 3974 | p.SendAppearanceToAgentNF(this); |
@@ -4025,7 +4016,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4025 | foreach (ScenePresence p in presences) | 4016 | foreach (ScenePresence p in presences) |
4026 | { | 4017 | { |
4027 | p.ControllingClient.SendAvatarDataImmediate(this); | 4018 | p.ControllingClient.SendAvatarDataImmediate(this); |
4028 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4019 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4029 | // either just kill the object | 4020 | // either just kill the object |
4030 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | 4021 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); |
4031 | // or also attachments viewer may still know about | 4022 | // or also attachments viewer may still know about |
@@ -4038,7 +4029,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4038 | public void SendInitialAvatarDataToAgent(ScenePresence p) | 4029 | public void SendInitialAvatarDataToAgent(ScenePresence p) |
4039 | { | 4030 | { |
4040 | p.ControllingClient.SendAvatarDataImmediate(this); | 4031 | p.ControllingClient.SendAvatarDataImmediate(this); |
4041 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4032 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4042 | // either just kill the object | 4033 | // either just kill the object |
4043 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | 4034 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); |
4044 | // or also attachments viewer may still know about | 4035 | // or also attachments viewer may still know about |
@@ -4052,7 +4043,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4052 | public void SendAvatarDataToAgent(ScenePresence avatar) | 4043 | public void SendAvatarDataToAgent(ScenePresence avatar) |
4053 | { | 4044 | { |
4054 | //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); |
4055 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodLevel < 200) | 4046 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodController.GodLevel < 200) |
4056 | return; | 4047 | return; |
4057 | avatar.ControllingClient.SendAvatarDataImmediate(this); | 4048 | avatar.ControllingClient.SendAvatarDataImmediate(this); |
4058 | } | 4049 | } |
@@ -4097,7 +4088,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4097 | { | 4088 | { |
4098 | // m_log.DebugFormat( | 4089 | // m_log.DebugFormat( |
4099 | // "[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); |
4100 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodLevel < 200) | 4091 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodController.GodLevel < 200) |
4101 | return; | 4092 | return; |
4102 | SendAppearanceToAgentNF(avatar); | 4093 | SendAppearanceToAgentNF(avatar); |
4103 | } | 4094 | } |
@@ -4113,7 +4104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4113 | if (IsChildAgent || Animator == null) | 4104 | if (IsChildAgent || Animator == null) |
4114 | return; | 4105 | return; |
4115 | 4106 | ||
4116 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4107 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4117 | return; | 4108 | return; |
4118 | 4109 | ||
4119 | Animator.SendAnimPackToClient(p.ControllingClient); | 4110 | Animator.SendAnimPackToClient(p.ControllingClient); |
@@ -4124,7 +4115,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4124 | if (IsChildAgent) | 4115 | if (IsChildAgent) |
4125 | return; | 4116 | return; |
4126 | 4117 | ||
4127 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4118 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4128 | return; | 4119 | return; |
4129 | 4120 | ||
4130 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); | 4121 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); |
@@ -4149,7 +4140,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4149 | 4140 | ||
4150 | m_scene.ForEachScenePresence(delegate(ScenePresence p) | 4141 | m_scene.ForEachScenePresence(delegate(ScenePresence p) |
4151 | { | 4142 | { |
4152 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4143 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4153 | return; | 4144 | return; |
4154 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); | 4145 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); |
4155 | }); | 4146 | }); |
@@ -4262,6 +4253,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4262 | agentpos.Position = AbsolutePosition; | 4253 | agentpos.Position = AbsolutePosition; |
4263 | agentpos.Velocity = Velocity; | 4254 | agentpos.Velocity = Velocity; |
4264 | agentpos.RegionHandle = RegionHandle; | 4255 | agentpos.RegionHandle = RegionHandle; |
4256 | agentpos.GodData = GodController.State(); | ||
4265 | agentpos.Throttles = ControllingClient.GetThrottlesPacked(1); | 4257 | agentpos.Throttles = ControllingClient.GetThrottlesPacked(1); |
4266 | 4258 | ||
4267 | // Let's get this out of the update loop | 4259 | // Let's get this out of the update loop |
@@ -4510,20 +4502,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
4510 | /// </summary> | 4502 | /// </summary> |
4511 | public void GrantGodlikePowers(UUID token, bool godStatus) | 4503 | public void GrantGodlikePowers(UUID token, bool godStatus) |
4512 | { | 4504 | { |
4513 | int oldgodlevel = GodLevel; | 4505 | if (isNPC) |
4514 | 4506 | return; | |
4515 | if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) | ||
4516 | { | ||
4517 | GodLevel = 200; | ||
4518 | if(GodLevel < UserLevel) | ||
4519 | GodLevel = UserLevel; | ||
4520 | } | ||
4521 | else | ||
4522 | GodLevel = 0; | ||
4523 | 4507 | ||
4524 | ControllingClient.SendAdminResponse(token, (uint)GodLevel); | 4508 | bool success = GodController.RequestGodMode(godStatus); |
4525 | if(oldgodlevel != GodLevel) | 4509 | if (success && godStatus) |
4526 | parcelGodCheck(m_currentParcelUUID, GodLevel >= 200); | 4510 | parcelGodCheck(m_currentParcelUUID, GodController.GodLevel >= 200); |
4527 | } | 4511 | } |
4528 | 4512 | ||
4529 | #region Child Agent Updates | 4513 | #region Child Agent Updates |
@@ -4554,6 +4538,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4554 | if (!IsChildAgent) | 4538 | if (!IsChildAgent) |
4555 | return; | 4539 | return; |
4556 | 4540 | ||
4541 | GodController.SetState(cAgentData.GodData); | ||
4542 | |||
4557 | RegionHandle = cAgentData.RegionHandle; | 4543 | RegionHandle = cAgentData.RegionHandle; |
4558 | 4544 | ||
4559 | //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); | 4545 | //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); |
@@ -4628,11 +4614,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4628 | cAgent.BodyRotation = Rotation; | 4614 | cAgent.BodyRotation = Rotation; |
4629 | cAgent.ControlFlags = (uint)m_AgentControlFlags; | 4615 | cAgent.ControlFlags = (uint)m_AgentControlFlags; |
4630 | 4616 | ||
4631 | if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) | ||
4632 | cAgent.GodLevel = (byte)GodLevel; | ||
4633 | else | ||
4634 | cAgent.GodLevel = (byte) 0; | ||
4635 | |||
4636 | cAgent.AlwaysRun = SetAlwaysRun; | 4617 | cAgent.AlwaysRun = SetAlwaysRun; |
4637 | 4618 | ||
4638 | // make clear we want the all thing | 4619 | // make clear we want the all thing |
@@ -4693,6 +4674,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4693 | // "[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()", |
4694 | // Name, m_scene.RegionInfo.RegionName, m_callbackURI); | 4675 | // Name, m_scene.RegionInfo.RegionName, m_callbackURI); |
4695 | 4676 | ||
4677 | GodController.SetState(cAgent.GodData); | ||
4678 | |||
4696 | m_pos = cAgent.Position; | 4679 | m_pos = cAgent.Position; |
4697 | m_velocity = cAgent.Velocity; | 4680 | m_velocity = cAgent.Velocity; |
4698 | CameraPosition = cAgent.Center; | 4681 | CameraPosition = cAgent.Center; |
@@ -4729,11 +4712,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4729 | Rotation = cAgent.BodyRotation; | 4712 | Rotation = cAgent.BodyRotation; |
4730 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; | 4713 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; |
4731 | 4714 | ||
4732 | if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID)) | ||
4733 | GodLevel = cAgent.GodLevel; | ||
4734 | else | ||
4735 | GodLevel = 0; | ||
4736 | |||
4737 | SetAlwaysRun = cAgent.AlwaysRun; | 4715 | SetAlwaysRun = cAgent.AlwaysRun; |
4738 | 4716 | ||
4739 | Appearance = new AvatarAppearance(cAgent.Appearance); | 4717 | Appearance = new AvatarAppearance(cAgent.Appearance); |
@@ -4963,7 +4941,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4963 | RaiseCollisionScriptEvents(coldata); | 4941 | RaiseCollisionScriptEvents(coldata); |
4964 | 4942 | ||
4965 | // 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 |
4966 | if (Invulnerable || GodLevel > 0) | 4944 | if (Invulnerable || GodController.GodLevel > 0) |
4967 | return; | 4945 | return; |
4968 | 4946 | ||
4969 | // The following may be better in the ICombatModule | 4947 | // The following may be better in the ICombatModule |
@@ -5248,7 +5226,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5248 | if (p != this && sog.HasPrivateAttachmentPoint) | 5226 | if (p != this && sog.HasPrivateAttachmentPoint) |
5249 | return; | 5227 | return; |
5250 | 5228 | ||
5251 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5229 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5252 | return; | 5230 | return; |
5253 | 5231 | ||
5254 | SendTerseUpdateToAgentNF(p); | 5232 | SendTerseUpdateToAgentNF(p); |
@@ -5362,7 +5340,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5362 | if (p == this) | 5340 | if (p == this) |
5363 | continue; | 5341 | continue; |
5364 | 5342 | ||
5365 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5343 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5366 | continue; | 5344 | continue; |
5367 | 5345 | ||
5368 | p.ControllingClient.SendEntityUpdate(rootpart, rootflag); | 5346 | p.ControllingClient.SendEntityUpdate(rootpart, rootflag); |
@@ -5421,7 +5399,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5421 | if (p == this) | 5399 | if (p == this) |
5422 | continue; | 5400 | continue; |
5423 | 5401 | ||
5424 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5402 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5425 | continue; | 5403 | continue; |
5426 | 5404 | ||
5427 | p.ControllingClient.SendEntityUpdate(rootpart, flag); | 5405 | p.ControllingClient.SendEntityUpdate(rootpart, flag); |
@@ -5471,7 +5449,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5471 | if (p == this) | 5449 | if (p == this) |
5472 | continue; | 5450 | continue; |
5473 | 5451 | ||
5474 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5452 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5475 | continue; | 5453 | continue; |
5476 | 5454 | ||
5477 | p.ControllingClient.SendEntityUpdate(part, flag); | 5455 | p.ControllingClient.SendEntityUpdate(part, flag); |
@@ -5512,7 +5490,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5512 | { | 5490 | { |
5513 | if (p == this) | 5491 | if (p == this) |
5514 | continue; | 5492 | continue; |
5515 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5493 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5516 | continue; | 5494 | continue; |
5517 | 5495 | ||
5518 | p.ControllingClient.SendEntityUpdate(part, flag); | 5496 | p.ControllingClient.SendEntityUpdate(part, flag); |
@@ -6150,7 +6128,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6150 | // the TP point. This behaviour mimics agni. | 6128 | // the TP point. This behaviour mimics agni. |
6151 | if (land.LandData.LandingType == (byte)LandingType.LandingPoint && | 6129 | if (land.LandData.LandingType == (byte)LandingType.LandingPoint && |
6152 | land.LandData.UserLocation != Vector3.Zero && | 6130 | land.LandData.UserLocation != Vector3.Zero && |
6153 | GodLevel < 200 && | 6131 | GodController.GodLevel < 200 && |
6154 | ((land.LandData.OwnerID != m_uuid && | 6132 | ((land.LandData.OwnerID != m_uuid && |
6155 | !m_scene.Permissions.IsGod(m_uuid) && | 6133 | !m_scene.Permissions.IsGod(m_uuid) && |
6156 | !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || | 6134 | !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || |
@@ -6175,7 +6153,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6175 | string reason; | 6153 | string reason; |
6176 | 6154 | ||
6177 | // dont mess with gods | 6155 | // dont mess with gods |
6178 | if(GodLevel >= 200 || m_scene.Permissions.IsGod(m_uuid)) | 6156 | if(GodController.GodLevel >= 200 || m_scene.Permissions.IsGod(m_uuid)) |
6179 | return true; | 6157 | return true; |
6180 | 6158 | ||
6181 | // respect region owner and managers | 6159 | // respect region owner and managers |
@@ -6523,7 +6501,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6523 | continue; | 6501 | continue; |
6524 | 6502 | ||
6525 | // those not on parcel dont see me | 6503 | // those not on parcel dont see me |
6526 | if (currentParcelID != p.currentParcelUUID && p.GodLevel < 200) | 6504 | if (currentParcelID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
6527 | { | 6505 | { |
6528 | killsToSendto.Add(p); // they dont see me | 6506 | killsToSendto.Add(p); // they dont see me |
6529 | } | 6507 | } |
@@ -6549,9 +6527,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
6549 | // only those on previus parcel need receive kills | 6527 | // only those on previus parcel need receive kills |
6550 | if (previusParcelID == p.currentParcelUUID) | 6528 | if (previusParcelID == p.currentParcelUUID) |
6551 | { | 6529 | { |
6552 | if(p.GodLevel < 200) | 6530 | if(p.GodController.GodLevel < 200) |
6553 | killsToSendto.Add(p); // they dont see me | 6531 | killsToSendto.Add(p); // they dont see me |
6554 | if(GodLevel < 200) | 6532 | if(GodController.GodLevel < 200) |
6555 | killsToSendme.Add(p); // i dont see them | 6533 | killsToSendme.Add(p); // i dont see them |
6556 | } | 6534 | } |
6557 | // only those on new parcel need see | 6535 | // only those on new parcel need see |
@@ -6573,7 +6551,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6573 | continue; | 6551 | continue; |
6574 | 6552 | ||
6575 | // those not on new parcel dont see me | 6553 | // those not on new parcel dont see me |
6576 | if (currentParcelID != p.currentParcelUUID && p.GodLevel < 200) | 6554 | if (currentParcelID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
6577 | { | 6555 | { |
6578 | killsToSendto.Add(p); // they dont see me | 6556 | killsToSendto.Add(p); // they dont see me |
6579 | } | 6557 | } |
@@ -6599,7 +6577,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6599 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) | 6577 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) |
6600 | continue; | 6578 | continue; |
6601 | // only those old parcel need kills | 6579 | // only those old parcel need kills |
6602 | if (previusParcelID == p.currentParcelUUID && GodLevel < 200) | 6580 | if (previusParcelID == p.currentParcelUUID && GodController.GodLevel < 200) |
6603 | { | 6581 | { |
6604 | killsToSendme.Add(p); // i dont see them | 6582 | killsToSendme.Add(p); // i dont see them |
6605 | } | 6583 | } |
@@ -6662,7 +6640,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6662 | if (Scene.AttachmentsModule != null) | 6640 | if (Scene.AttachmentsModule != null) |
6663 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | 6641 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); |
6664 | 6642 | ||
6665 | if (!ParcelHideThisAvatar || GodLevel >= 200) | 6643 | if (!ParcelHideThisAvatar || GodController.GodLevel >= 200) |
6666 | return; | 6644 | return; |
6667 | 6645 | ||
6668 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | 6646 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); |