aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/GodController.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs64
2 files changed, 38 insertions, 38 deletions
diff --git a/OpenSim/Region/Framework/Scenes/GodController.cs b/OpenSim/Region/Framework/Scenes/GodController.cs
index 0ccb4b6..7ed80f6 100644
--- a/OpenSim/Region/Framework/Scenes/GodController.cs
+++ b/OpenSim/Region/Framework/Scenes/GodController.cs
@@ -137,8 +137,8 @@ namespace OpenSim.Region.Framework.Scenes
137 m_godlevel = m_rightsGodLevel; 137 m_godlevel = m_rightsGodLevel;
138 } 138 }
139 139
140 m_scenePresence.isGod = (m_godlevel >= 200); 140 m_scenePresence.IsGod = (m_godlevel >= 200);
141 m_scenePresence.isViewerUIGod = (m_viewergodlevel >= 200); 141 m_scenePresence.IsViewerUIGod = (m_viewergodlevel >= 200);
142 } 142 }
143 143
144 // calculates god level at sp creation from local and grid user god rights 144 // calculates god level at sp creation from local and grid user god rights
@@ -176,8 +176,8 @@ namespace OpenSim.Region.Framework.Scenes
176 { 176 {
177 m_viewergodlevel = 0; 177 m_viewergodlevel = 0;
178 m_godlevel = 0; 178 m_godlevel = 0;
179 m_scenePresence.isGod = false; 179 m_scenePresence.IsGod = false;
180 m_scenePresence.isViewerUIGod = false; 180 m_scenePresence.IsViewerUIGod = false;
181 return; 181 return;
182 } 182 }
183 183
@@ -205,8 +205,8 @@ namespace OpenSim.Region.Framework.Scenes
205 m_godlevel = 0; 205 m_godlevel = 0;
206 } 206 }
207 } 207 }
208 m_scenePresence.isGod = (m_godlevel >= 200); 208 m_scenePresence.IsGod = (m_godlevel >= 200);
209 m_scenePresence.isViewerUIGod = (m_viewergodlevel >= 200); 209 m_scenePresence.IsViewerUIGod = (m_viewergodlevel >= 200);
210 } 210 }
211 211
212 public void SyncViewerState() 212 public void SyncViewerState()
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 58af505..bd0786b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -95,10 +95,10 @@ namespace OpenSim.Region.Framework.Scenes
95 // simple yes or no isGOD from god level >= 200 95 // simple yes or no isGOD from god level >= 200
96 // should only be set by GodController 96 // should only be set by GodController
97 // we have two to suport legacy behaviour 97 // we have two to suport legacy behaviour
98 // isViewerUIGod was controlled by viewer in older versions 98 // IsViewerUIGod was controlled by viewer in older versions
99 // isGod may now be also controled by viewer acording to options 99 // IsGod may now be also controled by viewer acording to options
100 public bool isViewerUIGod { get; set; } 100 public bool IsViewerUIGod { get; set; }
101 public bool isGod { get; set; } 101 public bool IsGod { get; set; }
102 102
103 private PresenceType m_presenceType; 103 private PresenceType m_presenceType;
104 public PresenceType PresenceType { 104 public PresenceType PresenceType {
@@ -2156,7 +2156,7 @@ namespace OpenSim.Region.Framework.Scenes
2156 if (p == this) 2156 if (p == this)
2157 continue; 2157 continue;
2158 2158
2159 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 2159 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
2160 continue; 2160 continue;
2161 2161
2162 SendAppearanceToAgentNF(p); 2162 SendAppearanceToAgentNF(p);
@@ -2206,7 +2206,7 @@ namespace OpenSim.Region.Framework.Scenes
2206 continue; 2206 continue;
2207 } 2207 }
2208 2208
2209 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 2209 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
2210 continue; 2210 continue;
2211 2211
2212 SendAttachmentsToAgentNF(p); 2212 SendAttachmentsToAgentNF(p);
@@ -3811,7 +3811,7 @@ namespace OpenSim.Region.Framework.Scenes
3811 if (!remoteClient.IsActive) 3811 if (!remoteClient.IsActive)
3812 return; 3812 return;
3813 3813
3814 if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && !p.isViewerUIGod) 3814 if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && !p.IsViewerUIGod)
3815 return; 3815 return;
3816 3816
3817 //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); 3817 //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
@@ -3921,7 +3921,7 @@ namespace OpenSim.Region.Framework.Scenes
3921 // get the avatar, then a kill if can't see it 3921 // get the avatar, then a kill if can't see it
3922 p.SendInitialAvatarDataToAgent(this); 3922 p.SendInitialAvatarDataToAgent(this);
3923 3923
3924 if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !isViewerUIGod) 3924 if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !IsViewerUIGod)
3925 return; 3925 return;
3926 3926
3927 p.SendAppearanceToAgentNF(this); 3927 p.SendAppearanceToAgentNF(this);
@@ -3969,7 +3969,7 @@ namespace OpenSim.Region.Framework.Scenes
3969 foreach (ScenePresence p in presences) 3969 foreach (ScenePresence p in presences)
3970 { 3970 {
3971 p.ControllingClient.SendAvatarDataImmediate(this); 3971 p.ControllingClient.SendAvatarDataImmediate(this);
3972 if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 3972 if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
3973 // either just kill the object 3973 // either just kill the object
3974 // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); 3974 // p.ControllingClient.SendKillObject(new List<uint> {LocalId});
3975 // or also attachments viewer may still know about 3975 // or also attachments viewer may still know about
@@ -3982,7 +3982,7 @@ namespace OpenSim.Region.Framework.Scenes
3982 public void SendInitialAvatarDataToAgent(ScenePresence p) 3982 public void SendInitialAvatarDataToAgent(ScenePresence p)
3983 { 3983 {
3984 p.ControllingClient.SendAvatarDataImmediate(this); 3984 p.ControllingClient.SendAvatarDataImmediate(this);
3985 if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 3985 if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
3986 // either just kill the object 3986 // either just kill the object
3987 // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); 3987 // p.ControllingClient.SendKillObject(new List<uint> {LocalId});
3988 // or also attachments viewer may still know about 3988 // or also attachments viewer may still know about
@@ -3996,7 +3996,7 @@ namespace OpenSim.Region.Framework.Scenes
3996 public void SendAvatarDataToAgent(ScenePresence avatar) 3996 public void SendAvatarDataToAgent(ScenePresence avatar)
3997 { 3997 {
3998 //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID); 3998 //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID);
3999 if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && !avatar.isViewerUIGod) 3999 if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && !avatar.IsViewerUIGod)
4000 return; 4000 return;
4001 avatar.ControllingClient.SendAvatarDataImmediate(this); 4001 avatar.ControllingClient.SendAvatarDataImmediate(this);
4002 } 4002 }
@@ -4041,7 +4041,7 @@ namespace OpenSim.Region.Framework.Scenes
4041 { 4041 {
4042 // m_log.DebugFormat( 4042 // m_log.DebugFormat(
4043 // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); 4043 // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID);
4044 if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && !avatar.isViewerUIGod) 4044 if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && !avatar.IsViewerUIGod)
4045 return; 4045 return;
4046 SendAppearanceToAgentNF(avatar); 4046 SendAppearanceToAgentNF(avatar);
4047 } 4047 }
@@ -4057,7 +4057,7 @@ namespace OpenSim.Region.Framework.Scenes
4057 if (IsChildAgent || Animator == null) 4057 if (IsChildAgent || Animator == null)
4058 return; 4058 return;
4059 4059
4060 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 4060 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
4061 return; 4061 return;
4062 4062
4063 Animator.SendAnimPackToClient(p.ControllingClient); 4063 Animator.SendAnimPackToClient(p.ControllingClient);
@@ -4068,7 +4068,7 @@ namespace OpenSim.Region.Framework.Scenes
4068 if (IsChildAgent) 4068 if (IsChildAgent)
4069 return; 4069 return;
4070 4070
4071 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 4071 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
4072 return; 4072 return;
4073 4073
4074 p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); 4074 p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs);
@@ -4093,7 +4093,7 @@ namespace OpenSim.Region.Framework.Scenes
4093 4093
4094 m_scene.ForEachScenePresence(delegate(ScenePresence p) 4094 m_scene.ForEachScenePresence(delegate(ScenePresence p)
4095 { 4095 {
4096 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 4096 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
4097 return; 4097 return;
4098 p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); 4098 p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs);
4099 }); 4099 });
@@ -4473,9 +4473,9 @@ namespace OpenSim.Region.Framework.Scenes
4473 if (IsNPC) 4473 if (IsNPC)
4474 return; 4474 return;
4475 4475
4476 bool wasgod = isViewerUIGod; 4476 bool wasgod = IsViewerUIGod;
4477 GodController.RequestGodMode(godStatus); 4477 GodController.RequestGodMode(godStatus);
4478 if (wasgod != isViewerUIGod) 4478 if (wasgod != IsViewerUIGod)
4479 parcelGodCheck(m_currentParcelUUID); 4479 parcelGodCheck(m_currentParcelUUID);
4480 } 4480 }
4481 4481
@@ -4909,7 +4909,7 @@ namespace OpenSim.Region.Framework.Scenes
4909 RaiseCollisionScriptEvents(coldata); 4909 RaiseCollisionScriptEvents(coldata);
4910 4910
4911 // Gods do not take damage and Invulnerable is set depending on parcel/region flags 4911 // Gods do not take damage and Invulnerable is set depending on parcel/region flags
4912 if (Invulnerable || isViewerUIGod) 4912 if (Invulnerable || IsViewerUIGod)
4913 return; 4913 return;
4914 4914
4915 // The following may be better in the ICombatModule 4915 // The following may be better in the ICombatModule
@@ -5194,7 +5194,7 @@ namespace OpenSim.Region.Framework.Scenes
5194 if (p != this && sog.HasPrivateAttachmentPoint) 5194 if (p != this && sog.HasPrivateAttachmentPoint)
5195 return; 5195 return;
5196 5196
5197 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 5197 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
5198 return; 5198 return;
5199 5199
5200 SendTerseUpdateToAgentNF(p); 5200 SendTerseUpdateToAgentNF(p);
@@ -5308,7 +5308,7 @@ namespace OpenSim.Region.Framework.Scenes
5308 if (p == this) 5308 if (p == this)
5309 continue; 5309 continue;
5310 5310
5311 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 5311 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
5312 continue; 5312 continue;
5313 5313
5314 p.ControllingClient.SendEntityUpdate(rootpart, rootflag); 5314 p.ControllingClient.SendEntityUpdate(rootpart, rootflag);
@@ -5366,7 +5366,7 @@ namespace OpenSim.Region.Framework.Scenes
5366 if (p == this) 5366 if (p == this)
5367 continue; 5367 continue;
5368 5368
5369 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 5369 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
5370 continue; 5370 continue;
5371 5371
5372 p.ControllingClient.SendEntityUpdate(rootpart, flag); 5372 p.ControllingClient.SendEntityUpdate(rootpart, flag);
@@ -5416,7 +5416,7 @@ namespace OpenSim.Region.Framework.Scenes
5416 if (p == this) 5416 if (p == this)
5417 continue; 5417 continue;
5418 5418
5419 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 5419 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
5420 continue; 5420 continue;
5421 5421
5422 p.ControllingClient.SendEntityUpdate(part, flag); 5422 p.ControllingClient.SendEntityUpdate(part, flag);
@@ -5457,7 +5457,7 @@ namespace OpenSim.Region.Framework.Scenes
5457 { 5457 {
5458 if (p == this) 5458 if (p == this)
5459 continue; 5459 continue;
5460 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isViewerUIGod) 5460 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
5461 continue; 5461 continue;
5462 5462
5463 p.ControllingClient.SendEntityUpdate(part, flag); 5463 p.ControllingClient.SendEntityUpdate(part, flag);
@@ -6095,7 +6095,7 @@ namespace OpenSim.Region.Framework.Scenes
6095 // the TP point. This behaviour mimics agni. 6095 // the TP point. This behaviour mimics agni.
6096 if (land.LandData.LandingType == (byte)LandingType.LandingPoint && 6096 if (land.LandData.LandingType == (byte)LandingType.LandingPoint &&
6097 land.LandData.UserLocation != Vector3.Zero && 6097 land.LandData.UserLocation != Vector3.Zero &&
6098 !isViewerUIGod && 6098 !IsViewerUIGod &&
6099 ((land.LandData.OwnerID != m_uuid && 6099 ((land.LandData.OwnerID != m_uuid &&
6100 !m_scene.Permissions.IsGod(m_uuid) && 6100 !m_scene.Permissions.IsGod(m_uuid) &&
6101 !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || 6101 !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) ||
@@ -6120,7 +6120,7 @@ namespace OpenSim.Region.Framework.Scenes
6120 string reason; 6120 string reason;
6121 6121
6122 // dont mess with gods 6122 // dont mess with gods
6123 if(isViewerUIGod || m_scene.Permissions.IsGod(m_uuid)) 6123 if(IsViewerUIGod || m_scene.Permissions.IsGod(m_uuid))
6124 return true; 6124 return true;
6125 6125
6126 // respect region owner and managers 6126 // respect region owner and managers
@@ -6417,7 +6417,7 @@ namespace OpenSim.Region.Framework.Scenes
6417 6417
6418 if (p.ParcelHideThisAvatar && p.currentParcelUUID != currentParcelID) 6418 if (p.ParcelHideThisAvatar && p.currentParcelUUID != currentParcelID)
6419 { 6419 {
6420 if (isViewerUIGod) 6420 if (IsViewerUIGod)
6421 p.SendViewTo(this); 6421 p.SendViewTo(this);
6422 else 6422 else
6423 p.SendKillTo(this); 6423 p.SendKillTo(this);
@@ -6468,7 +6468,7 @@ namespace OpenSim.Region.Framework.Scenes
6468 continue; 6468 continue;
6469 6469
6470 // those not on parcel dont see me 6470 // those not on parcel dont see me
6471 if (currentParcelID != p.currentParcelUUID && !p.isViewerUIGod) 6471 if (currentParcelID != p.currentParcelUUID && !p.IsViewerUIGod)
6472 { 6472 {
6473 killsToSendto.Add(p); // they dont see me 6473 killsToSendto.Add(p); // they dont see me
6474 } 6474 }
@@ -6494,9 +6494,9 @@ namespace OpenSim.Region.Framework.Scenes
6494 // only those on previus parcel need receive kills 6494 // only those on previus parcel need receive kills
6495 if (previusParcelID == p.currentParcelUUID) 6495 if (previusParcelID == p.currentParcelUUID)
6496 { 6496 {
6497 if(!p.isViewerUIGod) 6497 if(!p.IsViewerUIGod)
6498 killsToSendto.Add(p); // they dont see me 6498 killsToSendto.Add(p); // they dont see me
6499 if(!isViewerUIGod) 6499 if(!IsViewerUIGod)
6500 killsToSendme.Add(p); // i dont see them 6500 killsToSendme.Add(p); // i dont see them
6501 } 6501 }
6502 // only those on new parcel need see 6502 // only those on new parcel need see
@@ -6518,7 +6518,7 @@ namespace OpenSim.Region.Framework.Scenes
6518 continue; 6518 continue;
6519 6519
6520 // those not on new parcel dont see me 6520 // those not on new parcel dont see me
6521 if (currentParcelID != p.currentParcelUUID && !p.isViewerUIGod) 6521 if (currentParcelID != p.currentParcelUUID && !p.IsViewerUIGod)
6522 { 6522 {
6523 killsToSendto.Add(p); // they dont see me 6523 killsToSendto.Add(p); // they dont see me
6524 } 6524 }
@@ -6544,7 +6544,7 @@ namespace OpenSim.Region.Framework.Scenes
6544 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) 6544 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
6545 continue; 6545 continue;
6546 // only those old parcel need kills 6546 // only those old parcel need kills
6547 if (previusParcelID == p.currentParcelUUID && !isViewerUIGod) 6547 if (previusParcelID == p.currentParcelUUID && !IsViewerUIGod)
6548 { 6548 {
6549 killsToSendme.Add(p); // i dont see them 6549 killsToSendme.Add(p); // i dont see them
6550 } 6550 }
@@ -6606,7 +6606,7 @@ namespace OpenSim.Region.Framework.Scenes
6606 if (Scene.AttachmentsModule != null) 6606 if (Scene.AttachmentsModule != null)
6607 Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); 6607 Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
6608 6608
6609 if (!ParcelHideThisAvatar || isViewerUIGod) 6609 if (!ParcelHideThisAvatar || IsViewerUIGod)
6610 return; 6610 return;
6611 6611
6612 List<ScenePresence> allpresences = m_scene.GetScenePresences(); 6612 List<ScenePresence> allpresences = m_scene.GetScenePresences();