mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Fixed: Windlight functions caused an error if called when the script's owner isn't in the scene
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
14c72d4a5b
commit
50ea2e0d67
@@ -446,7 +446,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||||||
LSShoutError("LightShare functions are not enabled.");
|
LSShoutError("LightShare functions are not enabled.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200)
|
|
||||||
|
ScenePresence sp = World.GetScenePresence(m_host.OwnerID);
|
||||||
|
if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200))
|
||||||
{
|
{
|
||||||
LSShoutError("lsSetWindlightScene can only be used by estate managers or owners.");
|
LSShoutError("lsSetWindlightScene can only be used by estate managers or owners.");
|
||||||
return 0;
|
return 0;
|
||||||
@@ -474,7 +476,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||||||
LSShoutError("LightShare functions are not enabled.");
|
LSShoutError("LightShare functions are not enabled.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200)
|
|
||||||
|
ScenePresence sp = World.GetScenePresence(m_host.OwnerID);
|
||||||
|
if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200))
|
||||||
{
|
{
|
||||||
LSShoutError("lsSetWindlightScene can only be used by estate managers or owners.");
|
LSShoutError("lsSetWindlightScene can only be used by estate managers or owners.");
|
||||||
return;
|
return;
|
||||||
@@ -497,7 +501,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||||||
LSShoutError("LightShare functions are not enabled.");
|
LSShoutError("LightShare functions are not enabled.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200)
|
|
||||||
|
ScenePresence sp = World.GetScenePresence(m_host.OwnerID);
|
||||||
|
if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200))
|
||||||
{
|
{
|
||||||
LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners.");
|
LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners.");
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user