diff options
author | UbitUmarov | 2017-01-07 21:05:12 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-07 21:05:12 +0000 |
commit | 694720d7a98c3864abdb8e5062aa644e432bc1f6 (patch) | |
tree | 1e42a0cc41df1d626852e85f0b129e813d6ab315 /OpenSim/Region | |
parent | Merge branch 'master' into httptests (diff) | |
parent | Correct casing on isGod and isViewerUIGod (diff) | |
download | opensim-SC-694720d7a98c3864abdb8e5062aa644e432bc1f6.zip opensim-SC-694720d7a98c3864abdb8e5062aa644e432bc1f6.tar.gz opensim-SC-694720d7a98c3864abdb8e5062aa644e432bc1f6.tar.bz2 opensim-SC-694720d7a98c3864abdb8e5062aa644e432bc1f6.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to '')
19 files changed, 113 insertions, 112 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 316956b..df34668 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -11455,7 +11455,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11455 | ScenePresence p; | 11455 | ScenePresence p; |
11456 | if (scene.TryGetScenePresence(sender.AgentId, out p)) | 11456 | if (scene.TryGetScenePresence(sender.AgentId, out p)) |
11457 | { | 11457 | { |
11458 | if (p.GodController.GodLevel >= 200) | 11458 | if (p.IsViewerUIGod) |
11459 | { | 11459 | { |
11460 | groupProfileReply.GroupData.OpenEnrollment = true; | 11460 | groupProfileReply.GroupData.OpenEnrollment = true; |
11461 | groupProfileReply.GroupData.MembershipFee = 0; | 11461 | groupProfileReply.GroupData.MembershipFee = 0; |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 0826a08..fb408a4 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -364,7 +364,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
364 | return false; | 364 | return false; |
365 | 365 | ||
366 | // npcs dont have baked cache | 366 | // npcs dont have baked cache |
367 | if (((ScenePresence)sp).isNPC) | 367 | if (((ScenePresence)sp).IsNPC) |
368 | return true; | 368 | return true; |
369 | 369 | ||
370 | // uploaded baked textures will be in assets local cache | 370 | // uploaded baked textures will be in assets local cache |
@@ -507,7 +507,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
507 | { | 507 | { |
508 | int hits = 0; | 508 | int hits = 0; |
509 | 509 | ||
510 | if (((ScenePresence)sp).isNPC) | 510 | if (((ScenePresence)sp).IsNPC) |
511 | return true; | 511 | return true; |
512 | 512 | ||
513 | lock (m_setAppearanceLock) | 513 | lock (m_setAppearanceLock) |
@@ -701,7 +701,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
701 | 701 | ||
702 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) | 702 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) |
703 | { | 703 | { |
704 | if (((ScenePresence)sp).isNPC) | 704 | if (((ScenePresence)sp).IsNPC) |
705 | return 0; | 705 | return 0; |
706 | 706 | ||
707 | int texturesRebaked = 0; | 707 | int texturesRebaked = 0; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index adf5c68..ea90185 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
229 | fromPos = avatar.AbsolutePosition; | 229 | fromPos = avatar.AbsolutePosition; |
230 | fromName = avatar.Name; | 230 | fromName = avatar.Name; |
231 | fromID = c.Sender.AgentId; | 231 | fromID = c.Sender.AgentId; |
232 | if (avatar.GodController.GodLevel >= 200) | 232 | if (avatar.IsViewerUIGod) |
233 | { // let gods speak to outside or things may get confusing | 233 | { // let gods speak to outside or things may get confusing |
234 | fromNamePrefix = m_adminPrefix; | 234 | fromNamePrefix = m_adminPrefix; |
235 | checkParcelHide = false; | 235 | checkParcelHide = false; |
@@ -305,7 +305,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
305 | { | 305 | { |
306 | if (checkParcelHide) | 306 | if (checkParcelHide) |
307 | { | 307 | { |
308 | if (sourceParcelID != Presencecheck.LandData.GlobalID && presence.GodController.GodLevel < 200) | 308 | if (sourceParcelID != Presencecheck.LandData.GlobalID && !presence.IsViewerUIGod) |
309 | return; | 309 | return; |
310 | } | 310 | } |
311 | if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true) | 311 | if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs index 9843f2e..4a55a7e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs | |||
@@ -118,7 +118,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
118 | // If we're in god mode, we reverse the meaning. Offer | 118 | // If we're in god mode, we reverse the meaning. Offer |
119 | // calling card becomes "Take a calling card" for that | 119 | // calling card becomes "Take a calling card" for that |
120 | // person, no matter if they agree or not. | 120 | // person, no matter if they agree or not. |
121 | if (sp.GodController.GodLevel >= 200) | 121 | if (sp.IsViewerUIGod) |
122 | { | 122 | { |
123 | CreateCallingCard(client.AgentId, destID, UUID.Zero, true); | 123 | CreateCallingCard(client.AgentId, destID, UUID.Zero, true); |
124 | return; | 124 | return; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 8116b3c..f699c0c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | |||
@@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
165 | UUID agentID, UUID sessionID, UUID token, bool godLike) | 165 | UUID agentID, UUID sessionID, UUID token, bool godLike) |
166 | { | 166 | { |
167 | ScenePresence sp = m_scene.GetScenePresence(agentID); | 167 | ScenePresence sp = m_scene.GetScenePresence(agentID); |
168 | if(sp == null || sp.IsDeleted || sp.isNPC) | 168 | if(sp == null || sp.IsDeleted || sp.IsNPC) |
169 | return; | 169 | return; |
170 | 170 | ||
171 | if (sessionID != sp.ControllingClient.SessionId) | 171 | if (sessionID != sp.ControllingClient.SessionId) |
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
173 | 173 | ||
174 | sp.GrantGodlikePowers(token, godLike); | 174 | sp.GrantGodlikePowers(token, godLike); |
175 | 175 | ||
176 | if (godLike && sp.GodController.GodLevel < 200 && DialogModule != null) | 176 | if (godLike && !sp.IsViewerUIGod && DialogModule != null) |
177 | DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); | 177 | DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); |
178 | } | 178 | } |
179 | 179 | ||
@@ -194,14 +194,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
194 | int godlevel = 200; | 194 | int godlevel = 200; |
195 | // update level so higher gods can kick lower ones | 195 | // update level so higher gods can kick lower ones |
196 | ScenePresence god = m_scene.GetScenePresence(godID); | 196 | ScenePresence god = m_scene.GetScenePresence(godID); |
197 | if(god != null && god.GodController.EffectiveLevel > godlevel) | 197 | if(god != null && god.GodController.GodLevel > godlevel) |
198 | godlevel = god.GodController.EffectiveLevel; | 198 | godlevel = god.GodController.GodLevel; |
199 | 199 | ||
200 | if(agentID == ALL_AGENTS) | 200 | if(agentID == ALL_AGENTS) |
201 | { | 201 | { |
202 | m_scene.ForEachRootScenePresence(delegate(ScenePresence p) | 202 | m_scene.ForEachRootScenePresence(delegate(ScenePresence p) |
203 | { | 203 | { |
204 | if (p.UUID != godID && godlevel > p.GodController.EffectiveLevel) | 204 | if (p.UUID != godID && godlevel > p.GodController.GodLevel) |
205 | doKickmodes(godID, p, kickflags, reason); | 205 | doKickmodes(godID, p, kickflags, reason); |
206 | }); | 206 | }); |
207 | return; | 207 | return; |
@@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
224 | return; | 224 | return; |
225 | } | 225 | } |
226 | 226 | ||
227 | if (godlevel <= sp.GodController.EffectiveLevel) // no god wars | 227 | if (godlevel <= sp.GodController.GodLevel) // no god wars |
228 | return; | 228 | return; |
229 | 229 | ||
230 | if(sp.UUID == godID) | 230 | if(sp.UUID == godID) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index bd95ff0..6f79676 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
169 | 169 | ||
170 | GridInstantMessage m; | 170 | GridInstantMessage m; |
171 | 171 | ||
172 | if (scene.Permissions.IsAdministrator(client.AgentId) && presence.GodController.GodLevel >= 200 && (!scene.Permissions.IsAdministrator(targetid))) | 172 | if (scene.Permissions.IsAdministrator(client.AgentId) && presence.IsViewerUIGod && (!scene.Permissions.IsAdministrator(targetid))) |
173 | { | 173 | { |
174 | m = new GridInstantMessage(scene, client.AgentId, | 174 | m = new GridInstantMessage(scene, client.AgentId, |
175 | client.FirstName+" "+client.LastName, targetid, | 175 | client.FirstName+" "+client.LastName, targetid, |
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 138c0f7..bc8aeca 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -356,7 +356,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
356 | return; | 356 | return; |
357 | 357 | ||
358 | ScenePresence p = FindPresence(targetID); | 358 | ScenePresence p = FindPresence(targetID); |
359 | if (p != null && p.isNPC) | 359 | if (p != null && p.IsNPC) |
360 | { | 360 | { |
361 | remoteClient.SendAvatarClassifiedReply(targetID, classifieds); | 361 | remoteClient.SendAvatarClassifiedReply(targetID, classifieds); |
362 | return; | 362 | return; |
@@ -751,7 +751,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
751 | Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); | 751 | Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); |
752 | 752 | ||
753 | ScenePresence p = FindPresence(targetId); | 753 | ScenePresence p = FindPresence(targetId); |
754 | if (p != null && p.isNPC) | 754 | if (p != null && p.IsNPC) |
755 | { | 755 | { |
756 | remoteClient.SendAvatarPicksReply(targetId, picks); | 756 | remoteClient.SendAvatarPicksReply(targetId, picks); |
757 | return; | 757 | return; |
@@ -1165,7 +1165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1165 | public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) | 1165 | public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) |
1166 | { | 1166 | { |
1167 | ScenePresence p = FindPresence(queryTargetID); | 1167 | ScenePresence p = FindPresence(queryTargetID); |
1168 | if (p != null && p.isNPC) | 1168 | if (p != null && p.IsNPC) |
1169 | { | 1169 | { |
1170 | remoteClient.SendAgentAlertMessage( | 1170 | remoteClient.SendAgentAlertMessage( |
1171 | "Notes for NPCs not available", false); | 1171 | "Notes for NPCs not available", false); |
@@ -1329,7 +1329,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1329 | } | 1329 | } |
1330 | 1330 | ||
1331 | ScenePresence p = FindPresence(avatarID); | 1331 | ScenePresence p = FindPresence(avatarID); |
1332 | if (p != null && p.isNPC) | 1332 | if (p != null && p.IsNPC) |
1333 | { | 1333 | { |
1334 | remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, | 1334 | remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, |
1335 | Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 0x10, | 1335 | Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 0x10, |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index c780bcd..1529fc2 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
65 | 65 | ||
66 | public void OnMakeRootAgent(ScenePresence sp) | 66 | public void OnMakeRootAgent(ScenePresence sp) |
67 | { | 67 | { |
68 | if (sp.isNPC) | 68 | if (sp.IsNPC) |
69 | return; | 69 | return; |
70 | 70 | ||
71 | if(sp.gotCrossUpdate) | 71 | if(sp.gotCrossUpdate) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index aafd047..a7e62eb 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
68 | 68 | ||
69 | public void OnMakeRootAgent(ScenePresence sp) | 69 | public void OnMakeRootAgent(ScenePresence sp) |
70 | { | 70 | { |
71 | if (sp.isNPC) | 71 | if (sp.IsNPC) |
72 | return; | 72 | return; |
73 | 73 | ||
74 | if(sp.gotCrossUpdate) | 74 | if(sp.gotCrossUpdate) |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 0122f47..5d12f8b 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1285,7 +1285,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1285 | UUID parcelID = land.LandData.GlobalID; | 1285 | UUID parcelID = land.LandData.GlobalID; |
1286 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) | 1286 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
1287 | { | 1287 | { |
1288 | if (avatar.IsDeleted || avatar.isNPC) | 1288 | if (avatar.IsDeleted || avatar.IsNPC) |
1289 | return; | 1289 | return; |
1290 | 1290 | ||
1291 | IClientAPI client = avatar.ControllingClient; | 1291 | IClientAPI client = avatar.ControllingClient; |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index fc2282d..73b4cb5 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -718,7 +718,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
718 | if (!m_scene.TryGetScenePresence(avatar, out sp)) | 718 | if (!m_scene.TryGetScenePresence(avatar, out sp)) |
719 | return true; | 719 | return true; |
720 | 720 | ||
721 | if(sp==null || !sp.isNPC) | 721 | if(sp==null || !sp.IsNPC) |
722 | return true; | 722 | return true; |
723 | 723 | ||
724 | INPC npccli = (INPC)sp.ControllingClient; | 724 | INPC npccli = (INPC)sp.ControllingClient; |
diff --git a/OpenSim/Region/Framework/Scenes/GodController.cs b/OpenSim/Region/Framework/Scenes/GodController.cs index 8035760..7ed80f6 100644 --- a/OpenSim/Region/Framework/Scenes/GodController.cs +++ b/OpenSim/Region/Framework/Scenes/GodController.cs | |||
@@ -66,9 +66,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
66 | // the god level from local or grid user rights | 66 | // the god level from local or grid user rights |
67 | protected int m_rightsGodLevel = 0; | 67 | protected int m_rightsGodLevel = 0; |
68 | // the level seen by viewers | 68 | // the level seen by viewers |
69 | protected int m_godlevel = 0; | 69 | protected int m_viewergodlevel = 0; |
70 | // new level that can be fixed or equal to godlevel, acording to options | 70 | // new level that can be fixed or equal to godlevel, acording to options |
71 | protected int m_effectivegodlevel = 0; | 71 | protected int m_godlevel = 0; |
72 | protected int m_lastLevelToViewer = 0; | 72 | protected int m_lastLevelToViewer = 0; |
73 | 73 | ||
74 | public GodController(Scene scene, ScenePresence sp, int userlevel) | 74 | public GodController(Scene scene, ScenePresence sp, int userlevel) |
@@ -127,19 +127,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
127 | 127 | ||
128 | if(m_allowGodActionsWithoutGodMode) | 128 | if(m_allowGodActionsWithoutGodMode) |
129 | { | 129 | { |
130 | m_effectivegodlevel = m_rightsGodLevel; | 130 | m_godlevel = m_rightsGodLevel; |
131 | |||
132 | m_forceGodModeAlwaysOn = false; | 131 | m_forceGodModeAlwaysOn = false; |
133 | } | 132 | } |
134 | 133 | ||
135 | else if(m_forceGodModeAlwaysOn) | 134 | else if(m_forceGodModeAlwaysOn) |
136 | { | 135 | { |
136 | m_viewergodlevel = m_rightsGodLevel; | ||
137 | m_godlevel = m_rightsGodLevel; | 137 | m_godlevel = m_rightsGodLevel; |
138 | m_effectivegodlevel = m_rightsGodLevel; | ||
139 | } | 138 | } |
140 | 139 | ||
141 | m_scenePresence.isGod = (m_effectivegodlevel >= 200); | 140 | m_scenePresence.IsGod = (m_godlevel >= 200); |
142 | m_scenePresence.isLegacyGod = (m_godlevel >= 200); | 141 | m_scenePresence.IsViewerUIGod = (m_viewergodlevel >= 200); |
143 | } | 142 | } |
144 | 143 | ||
145 | // 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 |
@@ -175,10 +174,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
175 | { | 174 | { |
176 | if(!CanBeGod()) | 175 | if(!CanBeGod()) |
177 | { | 176 | { |
177 | m_viewergodlevel = 0; | ||
178 | m_godlevel = 0; | 178 | m_godlevel = 0; |
179 | m_effectivegodlevel = 0; | 179 | m_scenePresence.IsGod = false; |
180 | m_scenePresence.isGod = false; | 180 | m_scenePresence.IsViewerUIGod = false; |
181 | m_scenePresence.isLegacyGod = false; | ||
182 | return; | 181 | return; |
183 | } | 182 | } |
184 | 183 | ||
@@ -186,58 +185,58 @@ namespace OpenSim.Region.Framework.Scenes | |||
186 | if(m_allowGodActionsWithoutGodMode) | 185 | if(m_allowGodActionsWithoutGodMode) |
187 | { | 186 | { |
188 | if(viewerState) | 187 | if(viewerState) |
189 | m_godlevel = m_rightsGodLevel; | 188 | m_viewergodlevel = m_rightsGodLevel; |
190 | else | 189 | else |
191 | m_godlevel = 0; | 190 | m_viewergodlevel = 0; |
192 | 191 | ||
193 | m_effectivegodlevel = m_rightsGodLevel; | 192 | m_godlevel = m_rightsGodLevel; |
194 | } | 193 | } |
195 | else | 194 | else |
196 | { | 195 | { |
197 | // new all change with viewer | 196 | // new all change with viewer |
198 | if(viewerState) | 197 | if(viewerState) |
199 | { | 198 | { |
199 | m_viewergodlevel = m_rightsGodLevel; | ||
200 | m_godlevel = m_rightsGodLevel; | 200 | m_godlevel = m_rightsGodLevel; |
201 | m_effectivegodlevel = m_rightsGodLevel; | ||
202 | } | 201 | } |
203 | else | 202 | else |
204 | { | 203 | { |
204 | m_viewergodlevel = 0; | ||
205 | m_godlevel = 0; | 205 | m_godlevel = 0; |
206 | m_effectivegodlevel = 0; | ||
207 | } | 206 | } |
208 | } | 207 | } |
209 | m_scenePresence.isGod = (m_effectivegodlevel >= 200); | 208 | m_scenePresence.IsGod = (m_godlevel >= 200); |
210 | m_scenePresence.isLegacyGod = (m_godlevel >= 200); | 209 | m_scenePresence.IsViewerUIGod = (m_viewergodlevel >= 200); |
211 | } | 210 | } |
212 | 211 | ||
213 | public void SyncViewerState() | 212 | public void SyncViewerState() |
214 | { | 213 | { |
215 | if(m_lastLevelToViewer == m_godlevel) | 214 | if(m_lastLevelToViewer == m_viewergodlevel) |
216 | return; | 215 | return; |
217 | 216 | ||
218 | m_lastLevelToViewer = m_godlevel; | 217 | m_lastLevelToViewer = m_viewergodlevel; |
219 | 218 | ||
220 | if(m_scenePresence.IsChildAgent) | 219 | if(m_scenePresence.IsChildAgent) |
221 | return; | 220 | return; |
222 | 221 | ||
223 | m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, (uint)m_godlevel); | 222 | m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, (uint)m_viewergodlevel); |
224 | } | 223 | } |
225 | 224 | ||
226 | public void RequestGodMode(bool god) | 225 | public void RequestGodMode(bool god) |
227 | { | 226 | { |
228 | UpdateGodLevels(god); | 227 | UpdateGodLevels(god); |
229 | 228 | ||
230 | if(m_lastLevelToViewer != m_godlevel) | 229 | if(m_lastLevelToViewer != m_viewergodlevel) |
231 | { | 230 | { |
232 | m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, (uint)m_godlevel); | 231 | m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, (uint)m_viewergodlevel); |
233 | m_lastLevelToViewer = m_godlevel; | 232 | m_lastLevelToViewer = m_viewergodlevel; |
234 | } | 233 | } |
235 | } | 234 | } |
236 | 235 | ||
237 | public OSD State() | 236 | public OSD State() |
238 | { | 237 | { |
239 | OSDMap godMap = new OSDMap(2); | 238 | OSDMap godMap = new OSDMap(2); |
240 | bool m_viewerUiIsGod = m_godlevel >= 200; | 239 | bool m_viewerUiIsGod = m_viewergodlevel >= 200; |
241 | godMap.Add("ViewerUiIsGod", OSD.FromBoolean(m_viewerUiIsGod)); | 240 | godMap.Add("ViewerUiIsGod", OSD.FromBoolean(m_viewerUiIsGod)); |
242 | 241 | ||
243 | return godMap; | 242 | return godMap; |
@@ -256,7 +255,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
256 | 255 | ||
257 | if (s.ContainsKey("ViewerUiIsGod")) | 256 | if (s.ContainsKey("ViewerUiIsGod")) |
258 | newstate = s["ViewerUiIsGod"].AsBoolean(); | 257 | newstate = s["ViewerUiIsGod"].AsBoolean(); |
259 | m_lastLevelToViewer = m_godlevel; // we are not changing viewer level by default | 258 | m_lastLevelToViewer = m_viewergodlevel; // we are not changing viewer level by default |
260 | } | 259 | } |
261 | } | 260 | } |
262 | UpdateGodLevels(newstate); | 261 | UpdateGodLevels(newstate); |
@@ -273,14 +272,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
273 | set { m_userLevel = value; } | 272 | set { m_userLevel = value; } |
274 | } | 273 | } |
275 | 274 | ||
276 | public int GodLevel | 275 | public int ViwerUIGodLevel |
277 | { | 276 | { |
278 | get { return m_godlevel; } | 277 | get { return m_viewergodlevel; } |
279 | } | 278 | } |
280 | 279 | ||
281 | public int EffectiveLevel | 280 | public int GodLevel |
282 | { | 281 | { |
283 | get { return m_effectivegodlevel; } | 282 | get { return m_godlevel; } |
284 | } | 283 | } |
285 | } | 284 | } |
286 | } | 285 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 87c3049..2137b42 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3951,7 +3951,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3951 | bool vialogin = ((teleportFlags & (uint)TPFlags.ViaLogin) != 0 || | 3951 | bool vialogin = ((teleportFlags & (uint)TPFlags.ViaLogin) != 0 || |
3952 | (teleportFlags & (uint)TPFlags.ViaHGLogin) != 0); | 3952 | (teleportFlags & (uint)TPFlags.ViaHGLogin) != 0); |
3953 | bool viahome = ((teleportFlags & (uint)TPFlags.ViaHome) != 0); | 3953 | bool viahome = ((teleportFlags & (uint)TPFlags.ViaHome) != 0); |
3954 | bool godlike = ((teleportFlags & (uint)TPFlags.Godlike) != 0); | 3954 | // bool godlike = ((teleportFlags & (uint)TPFlags.Godlike) != 0); |
3955 | 3955 | ||
3956 | reason = String.Empty; | 3956 | reason = String.Empty; |
3957 | 3957 | ||
@@ -4251,7 +4251,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4251 | } | 4251 | } |
4252 | // only check access, actual relocations will happen later on ScenePresence MakeRoot | 4252 | // only check access, actual relocations will happen later on ScenePresence MakeRoot |
4253 | // allow child agents creation | 4253 | // allow child agents creation |
4254 | if(!godlike && teleportFlags != (uint) TPFlags.Default) | 4254 | // if(!godlike && teleportFlags != (uint) TPFlags.Default) |
4255 | if(teleportFlags != (uint) TPFlags.Default) | ||
4255 | { | 4256 | { |
4256 | bool checkTeleHub; | 4257 | bool checkTeleHub; |
4257 | 4258 | ||
@@ -6188,9 +6189,10 @@ Environment.Exit(1); | |||
6188 | if (Permissions.IsGod(agentID)) | 6189 | if (Permissions.IsGod(agentID)) |
6189 | return true; | 6190 | return true; |
6190 | 6191 | ||
6191 | bool isAdmin = Permissions.IsAdministrator(agentID); | 6192 | // Permissions.IsAdministrator is the same as IsGod for now |
6192 | if(isAdmin) | 6193 | // bool isAdmin = Permissions.IsAdministrator(agentID); |
6193 | return true; | 6194 | // if(isAdmin) |
6195 | // return true; | ||
6194 | 6196 | ||
6195 | // also honor estate managers access rights | 6197 | // also honor estate managers access rights |
6196 | bool isManager = Permissions.IsEstateManager(agentID); | 6198 | bool isManager = Permissions.IsEstateManager(agentID); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 8fdb0f1..5928764 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2302,7 +2302,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2302 | List<ScenePresence> sitters = GetSittingAvatars(); | 2302 | List<ScenePresence> sitters = GetSittingAvatars(); |
2303 | foreach(ScenePresence sp in sitters) | 2303 | foreach(ScenePresence sp in sitters) |
2304 | { | 2304 | { |
2305 | if(!sp.IsDeleted && !sp.isNPC && sp.IsSatOnObject) | 2305 | if(!sp.IsDeleted && !sp.IsNPC && sp.IsSatOnObject) |
2306 | return; | 2306 | return; |
2307 | } | 2307 | } |
2308 | } | 2308 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 99be06b..b8ac089 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2723,7 +2723,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2723 | detobj.posVector = av.AbsolutePosition; | 2723 | detobj.posVector = av.AbsolutePosition; |
2724 | detobj.rotQuat = av.Rotation; | 2724 | detobj.rotQuat = av.Rotation; |
2725 | detobj.velVector = av.Velocity; | 2725 | detobj.velVector = av.Velocity; |
2726 | detobj.colliderType = av.isNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs | 2726 | detobj.colliderType = av.IsNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs |
2727 | if(av.IsSatOnObject) | 2727 | if(av.IsSatOnObject) |
2728 | detobj.colliderType |= 0x4; //passive | 2728 | detobj.colliderType |= 0x4; //passive |
2729 | else if(detobj.velVector != Vector3.Zero) | 2729 | else if(detobj.velVector != Vector3.Zero) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index dbca68b..bd0786b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -90,15 +90,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
90 | m_scene.EventManager.TriggerScenePresenceUpdated(this); | 90 | m_scene.EventManager.TriggerScenePresenceUpdated(this); |
91 | } | 91 | } |
92 | 92 | ||
93 | public bool isNPC { get; private set; } | 93 | public bool IsNPC { get; private set; } |
94 | 94 | ||
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 | // isLegacyGod 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 isLegacyGod { 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 { |
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
106 | private set | 106 | private set |
107 | { | 107 | { |
108 | m_presenceType = value; | 108 | m_presenceType = value; |
109 | isNPC = (m_presenceType == PresenceType.Npc); | 109 | IsNPC = (m_presenceType == PresenceType.Npc); |
110 | } | 110 | } |
111 | } | 111 | } |
112 | 112 | ||
@@ -1264,7 +1264,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1264 | IsLoggingIn = false; | 1264 | IsLoggingIn = false; |
1265 | } | 1265 | } |
1266 | 1266 | ||
1267 | IsChildAgent = false; | 1267 | IsChildAgent = false; |
1268 | } | 1268 | } |
1269 | 1269 | ||
1270 | m_log.DebugFormat("[MakeRootAgent] out lock: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 1270 | m_log.DebugFormat("[MakeRootAgent] out lock: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
@@ -1974,7 +1974,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1974 | try | 1974 | try |
1975 | { | 1975 | { |
1976 | // Make sure it's not a login agent. We don't want to wait for updates during login | 1976 | // Make sure it's not a login agent. We don't want to wait for updates during login |
1977 | if (!isNPC && !IsRealLogin(m_teleportFlags)) | 1977 | if (!IsNPC && !IsRealLogin(m_teleportFlags)) |
1978 | { | 1978 | { |
1979 | 1979 | ||
1980 | // Let's wait until UpdateAgent (called by departing region) is done | 1980 | // Let's wait until UpdateAgent (called by departing region) is done |
@@ -2012,7 +2012,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2012 | 2012 | ||
2013 | m_log.DebugFormat("[CompleteMovement] MakeRootAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2013 | m_log.DebugFormat("[CompleteMovement] MakeRootAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2014 | 2014 | ||
2015 | if(!haveGroupInformation && !IsChildAgent && !isNPC) | 2015 | if(!haveGroupInformation && !IsChildAgent && !IsNPC) |
2016 | { | 2016 | { |
2017 | IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); | 2017 | IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); |
2018 | if (gm != null) | 2018 | if (gm != null) |
@@ -2086,7 +2086,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2086 | m_currentParcelHide = false; | 2086 | m_currentParcelHide = false; |
2087 | m_currentParcelUUID = UUID.Zero; | 2087 | m_currentParcelUUID = UUID.Zero; |
2088 | 2088 | ||
2089 | if(!isNPC) | 2089 | if(!IsNPC) |
2090 | { | 2090 | { |
2091 | GodController.SyncViewerState(); | 2091 | GodController.SyncViewerState(); |
2092 | 2092 | ||
@@ -2104,7 +2104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2104 | // verify baked textures and cache | 2104 | // verify baked textures and cache |
2105 | bool cachedbaked = false; | 2105 | bool cachedbaked = false; |
2106 | 2106 | ||
2107 | if (isNPC) | 2107 | if (IsNPC) |
2108 | cachedbaked = true; | 2108 | cachedbaked = true; |
2109 | else | 2109 | else |
2110 | { | 2110 | { |
@@ -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.isLegacyGod) | 2159 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) |
2160 | continue; | 2160 | continue; |
2161 | 2161 | ||
2162 | SendAppearanceToAgentNF(p); | 2162 | SendAppearanceToAgentNF(p); |
@@ -2168,14 +2168,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2168 | m_log.DebugFormat("[CompleteMovement] ValidateAndSendAppearanceAndAgentData: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2168 | m_log.DebugFormat("[CompleteMovement] ValidateAndSendAppearanceAndAgentData: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2169 | 2169 | ||
2170 | // attachments | 2170 | // attachments |
2171 | if (isNPC || IsRealLogin(m_teleportFlags)) | 2171 | if (IsNPC || IsRealLogin(m_teleportFlags)) |
2172 | { | 2172 | { |
2173 | if (Scene.AttachmentsModule != null) | 2173 | if (Scene.AttachmentsModule != null) |
2174 | // Util.FireAndForget( | 2174 | // Util.FireAndForget( |
2175 | // o => | 2175 | // o => |
2176 | // { | 2176 | // { |
2177 | 2177 | ||
2178 | if (!isNPC) | 2178 | if (!IsNPC) |
2179 | Scene.AttachmentsModule.RezAttachments(this); | 2179 | Scene.AttachmentsModule.RezAttachments(this); |
2180 | else | 2180 | else |
2181 | Util.FireAndForget(x => | 2181 | Util.FireAndForget(x => |
@@ -2206,7 +2206,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2206 | continue; | 2206 | continue; |
2207 | } | 2207 | } |
2208 | 2208 | ||
2209 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.isLegacyGod) | 2209 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) |
2210 | continue; | 2210 | continue; |
2211 | 2211 | ||
2212 | SendAttachmentsToAgentNF(p); | 2212 | SendAttachmentsToAgentNF(p); |
@@ -2226,7 +2226,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2226 | } | 2226 | } |
2227 | // let updates be sent, with some delay | 2227 | // let updates be sent, with some delay |
2228 | m_lastChildUpdatesTime = Util.EnvironmentTickCount() + 10000; | 2228 | m_lastChildUpdatesTime = Util.EnvironmentTickCount() + 10000; |
2229 | m_lastChildAgentUpdateGodLevel = GodController.GodLevel; | 2229 | m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; |
2230 | m_lastChildAgentUpdateDrawDistance = DrawDistance; | 2230 | m_lastChildAgentUpdateDrawDistance = DrawDistance; |
2231 | m_lastChildAgentUpdatePosition = AbsolutePosition; | 2231 | m_lastChildAgentUpdatePosition = AbsolutePosition; |
2232 | m_childUpdatesBusy = false; // allow them | 2232 | m_childUpdatesBusy = false; // allow them |
@@ -2235,7 +2235,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2235 | m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2235 | m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2236 | 2236 | ||
2237 | // send the rest of the world | 2237 | // send the rest of the world |
2238 | if (m_teleportFlags > 0 && !isNPC || m_currentParcelHide) | 2238 | if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) |
2239 | SendInitialDataToMe(); | 2239 | SendInitialDataToMe(); |
2240 | 2240 | ||
2241 | // priority uses avatar position only | 2241 | // priority uses avatar position only |
@@ -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.isLegacyGod) | 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 && !isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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 | }); |
@@ -4192,7 +4192,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4192 | return; | 4192 | return; |
4193 | 4193 | ||
4194 | bool doUpdate = false; | 4194 | bool doUpdate = false; |
4195 | if(m_lastChildAgentUpdateGodLevel != GodController.GodLevel) | 4195 | if(m_lastChildAgentUpdateGodLevel != GodController.ViwerUIGodLevel) |
4196 | doUpdate = true; | 4196 | doUpdate = true; |
4197 | 4197 | ||
4198 | if(!doUpdate && Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f) | 4198 | if(!doUpdate && Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f) |
@@ -4209,7 +4209,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4209 | { | 4209 | { |
4210 | m_childUpdatesBusy = true; | 4210 | m_childUpdatesBusy = true; |
4211 | m_lastChildAgentUpdatePosition = pos; | 4211 | m_lastChildAgentUpdatePosition = pos; |
4212 | m_lastChildAgentUpdateGodLevel = GodController.GodLevel; | 4212 | m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; |
4213 | m_lastChildAgentUpdateDrawDistance = DrawDistance; | 4213 | m_lastChildAgentUpdateDrawDistance = DrawDistance; |
4214 | // m_lastChildAgentUpdateCamPosition = CameraPosition; | 4214 | // m_lastChildAgentUpdateCamPosition = CameraPosition; |
4215 | 4215 | ||
@@ -4470,12 +4470,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
4470 | /// </summary> | 4470 | /// </summary> |
4471 | public void GrantGodlikePowers(UUID token, bool godStatus) | 4471 | public void GrantGodlikePowers(UUID token, bool godStatus) |
4472 | { | 4472 | { |
4473 | if (isNPC) | 4473 | if (IsNPC) |
4474 | return; | 4474 | return; |
4475 | 4475 | ||
4476 | bool wasgod = isLegacyGod; | 4476 | bool wasgod = IsViewerUIGod; |
4477 | GodController.RequestGodMode(godStatus); | 4477 | GodController.RequestGodMode(godStatus); |
4478 | if (wasgod != isLegacyGod) | 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 || isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 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 | !isLegacyGod && | 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(isLegacyGod || 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 |
@@ -6194,7 +6194,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6194 | detobj.posVector = av.AbsolutePosition; | 6194 | detobj.posVector = av.AbsolutePosition; |
6195 | detobj.rotQuat = av.Rotation; | 6195 | detobj.rotQuat = av.Rotation; |
6196 | detobj.velVector = av.Velocity; | 6196 | detobj.velVector = av.Velocity; |
6197 | detobj.colliderType = av.isNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs | 6197 | detobj.colliderType = av.IsNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs |
6198 | if(av.IsSatOnObject) | 6198 | if(av.IsSatOnObject) |
6199 | detobj.colliderType |= 0x4; //passive | 6199 | detobj.colliderType |= 0x4; //passive |
6200 | else if(detobj.velVector != Vector3.Zero) | 6200 | else if(detobj.velVector != Vector3.Zero) |
@@ -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 (isLegacyGod) | 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.isLegacyGod) | 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.isLegacyGod) | 6497 | if(!p.IsViewerUIGod) |
6498 | killsToSendto.Add(p); // they dont see me | 6498 | killsToSendto.Add(p); // they dont see me |
6499 | if(!isLegacyGod) | 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.isLegacyGod) | 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 && !isLegacyGod) | 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 || isLegacyGod) | 6609 | if (!ParcelHideThisAvatar || IsViewerUIGod) |
6610 | return; | 6610 | return; |
6611 | 6611 | ||
6612 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | 6612 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 92d6808..ad7fc6c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5029,7 +5029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5029 | else | 5029 | else |
5030 | { | 5030 | { |
5031 | // agent must not be a god | 5031 | // agent must not be a god |
5032 | if (presence.GodController.GodLevel >= 200) return; | 5032 | if (presence.IsViewerUIGod) return; |
5033 | 5033 | ||
5034 | // agent must be over the owners land | 5034 | // agent must be over the owners land |
5035 | ILandObject agentLand = World.LandChannel.GetLandObject(presence.AbsolutePosition); | 5035 | ILandObject agentLand = World.LandChannel.GetLandObject(presence.AbsolutePosition); |
@@ -5256,7 +5256,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5256 | return; | 5256 | return; |
5257 | 5257 | ||
5258 | // Pushee is in GodMode this pushing object isn't owned by them | 5258 | // Pushee is in GodMode this pushing object isn't owned by them |
5259 | if (avatar.GodController.GodLevel > 0 && m_host.OwnerID != targetID) | 5259 | if (avatar.IsViewerUIGod && m_host.OwnerID != targetID) |
5260 | return; | 5260 | return; |
5261 | 5261 | ||
5262 | pusheeav = avatar; | 5262 | pusheeav = avatar; |
@@ -6687,7 +6687,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6687 | delegate (ScenePresence ssp) | 6687 | delegate (ScenePresence ssp) |
6688 | { | 6688 | { |
6689 | // Gods are not listed in SL | 6689 | // Gods are not listed in SL |
6690 | if (!ssp.IsDeleted && ssp.GodController.GodLevel == 0.0 && !ssp.IsChildAgent) | 6690 | if (!ssp.IsDeleted && !ssp.IsViewerUIGod && !ssp.IsChildAgent) |
6691 | { | 6691 | { |
6692 | if (!regionWide) | 6692 | if (!regionWide) |
6693 | { | 6693 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 49e70bc..238fefb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |||
@@ -721,7 +721,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
721 | { | 721 | { |
722 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 722 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
723 | 723 | ||
724 | if (sp == null || sp.GodController.GodLevel < 200) | 724 | if (sp == null || !sp.IsViewerUIGod) |
725 | { | 725 | { |
726 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 726 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); |
727 | return 0; | 727 | return 0; |
@@ -768,7 +768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
768 | { | 768 | { |
769 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 769 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
770 | 770 | ||
771 | if (sp == null || sp.GodController.GodLevel < 200) | 771 | if (sp == null || !sp.IsViewerUIGod) |
772 | { | 772 | { |
773 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 773 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); |
774 | return; | 774 | return; |
@@ -799,7 +799,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
799 | { | 799 | { |
800 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 800 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
801 | 801 | ||
802 | if (sp == null || sp.GodController.GodLevel < 200) | 802 | if (sp == null || !sp.IsViewerUIGod) |
803 | { | 803 | { |
804 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); | 804 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); |
805 | return 0; | 805 | return 0; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index c7e7f89..1808c34 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -540,7 +540,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
540 | } | 540 | } |
541 | } | 541 | } |
542 | 542 | ||
543 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodController.GodLevel > 0.0) | 543 | if (presence.IsDeleted || presence.IsChildAgent || presence.IsViewerUIGod) |
544 | return; | 544 | return; |
545 | 545 | ||
546 | // if the object the script is in is attached and the avatar is the owner | 546 | // if the object the script is in is attached and the avatar is the owner |