mirror of
https://github.com/opensim/opensim.git
synced 2026-07-30 21:38:46 +08:00
replace godlevel compares by the new faster bool isViewerUIGod
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user