From effa32cfa4cc252e9d52d536af510b4e1e92337c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 7 Jan 2017 18:41:46 +0000 Subject: replace godlevel compares by the new faster bool isViewerUIGod --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | 6 +++--- .../ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 92d6808..51ab5fd 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 else { // agent must not be a god - if (presence.GodController.GodLevel >= 200) return; + if (presence.isViewerUIGod) return; // agent must be over the owners land ILandObject agentLand = World.LandChannel.GetLandObject(presence.AbsolutePosition); @@ -5256,7 +5256,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; // Pushee is in GodMode this pushing object isn't owned by them - if (avatar.GodController.GodLevel > 0 && m_host.OwnerID != targetID) + if (avatar.isViewerUIGod && m_host.OwnerID != targetID) return; pusheeav = avatar; @@ -6687,7 +6687,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api delegate (ScenePresence ssp) { // Gods are not listed in SL - if (!ssp.IsDeleted && ssp.GodController.GodLevel == 0.0 && !ssp.IsChildAgent) + if (!ssp.IsDeleted && !ssp.isViewerUIGod && !ssp.IsChildAgent) { if (!regionWide) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 49e70bc..40ad291 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 { ScenePresence sp = World.GetScenePresence(m_host.OwnerID); - if (sp == null || sp.GodController.GodLevel < 200) + if (sp == null || !sp.isViewerUIGod) { LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); return 0; @@ -768,7 +768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { ScenePresence sp = World.GetScenePresence(m_host.OwnerID); - if (sp == null || sp.GodController.GodLevel < 200) + if (sp == null || !sp.isViewerUIGod) { LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); return; @@ -799,7 +799,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { ScenePresence sp = World.GetScenePresence(m_host.OwnerID); - if (sp == null || sp.GodController.GodLevel < 200) + if (sp == null || !sp.isViewerUIGod) { LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); 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..bd53700 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 } } - if (presence.IsDeleted || presence.IsChildAgent || presence.GodController.GodLevel > 0.0) + if (presence.IsDeleted || presence.IsChildAgent || presence.isViewerUIGod) return; // if the object the script is in is attached and the avatar is the owner -- cgit v1.1 From e58903be6f745f7fca2a8d652e0f2d9a9283a04f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 7 Jan 2017 20:38:30 +0000 Subject: Correct casing on isGod and isViewerUIGod --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | 6 +++--- .../ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 51ab5fd..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 else { // agent must not be a god - if (presence.isViewerUIGod) return; + if (presence.IsViewerUIGod) return; // agent must be over the owners land ILandObject agentLand = World.LandChannel.GetLandObject(presence.AbsolutePosition); @@ -5256,7 +5256,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; // Pushee is in GodMode this pushing object isn't owned by them - if (avatar.isViewerUIGod && m_host.OwnerID != targetID) + if (avatar.IsViewerUIGod && m_host.OwnerID != targetID) return; pusheeav = avatar; @@ -6687,7 +6687,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api delegate (ScenePresence ssp) { // Gods are not listed in SL - if (!ssp.IsDeleted && !ssp.isViewerUIGod && !ssp.IsChildAgent) + if (!ssp.IsDeleted && !ssp.IsViewerUIGod && !ssp.IsChildAgent) { if (!regionWide) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 40ad291..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 { ScenePresence sp = World.GetScenePresence(m_host.OwnerID); - if (sp == null || !sp.isViewerUIGod) + if (sp == null || !sp.IsViewerUIGod) { LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); return 0; @@ -768,7 +768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { ScenePresence sp = World.GetScenePresence(m_host.OwnerID); - if (sp == null || !sp.isViewerUIGod) + if (sp == null || !sp.IsViewerUIGod) { LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); return; @@ -799,7 +799,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { ScenePresence sp = World.GetScenePresence(m_host.OwnerID); - if (sp == null || !sp.isViewerUIGod) + if (sp == null || !sp.IsViewerUIGod) { LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); 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 bd53700..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 } } - if (presence.IsDeleted || presence.IsChildAgent || presence.isViewerUIGod) + if (presence.IsDeleted || presence.IsChildAgent || presence.IsViewerUIGod) return; // if the object the script is in is attached and the avatar is the owner -- cgit v1.1