aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorOren Hurvitz2013-10-31 12:50:17 +0200
committerJustin Clark-Casey (justincc)2014-01-17 01:47:37 +0000
commit39e5785c0f5bfa9fce2549757ac895920c88825a (patch)
treee07b876d7307f2bfbee80e3005c8db85a7af887a /OpenSim/Region
parentActually put IsChildAgent = true inside the lock, otherwise there is still a ... (diff)
downloadopensim-SC-39e5785c0f5bfa9fce2549757ac895920c88825a.zip
opensim-SC-39e5785c0f5bfa9fce2549757ac895920c88825a.tar.gz
opensim-SC-39e5785c0f5bfa9fce2549757ac895920c88825a.tar.bz2
opensim-SC-39e5785c0f5bfa9fce2549757ac895920c88825a.tar.xz
Fixed: Windlight functions caused an error if called when the script's owner isn't in the scene
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
index 1d6cb6d..30eed40 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
@@ -446,7 +446,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
446 LSShoutError("LightShare functions are not enabled."); 446 LSShoutError("LightShare functions are not enabled.");
447 return 0; 447 return 0;
448 } 448 }
449 if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) 449
450 ScenePresence sp = World.GetScenePresence(m_host.OwnerID);
451 if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200))
450 { 452 {
451 LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); 453 LSShoutError("lsSetWindlightScene can only be used by estate managers or owners.");
452 return 0; 454 return 0;
@@ -474,7 +476,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
474 LSShoutError("LightShare functions are not enabled."); 476 LSShoutError("LightShare functions are not enabled.");
475 return; 477 return;
476 } 478 }
477 if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) 479
480 ScenePresence sp = World.GetScenePresence(m_host.OwnerID);
481 if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200))
478 { 482 {
479 LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); 483 LSShoutError("lsSetWindlightScene can only be used by estate managers or owners.");
480 return; 484 return;
@@ -497,7 +501,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
497 LSShoutError("LightShare functions are not enabled."); 501 LSShoutError("LightShare functions are not enabled.");
498 return 0; 502 return 0;
499 } 503 }
500 if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) 504
505 ScenePresence sp = World.GetScenePresence(m_host.OwnerID);
506 if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200))
501 { 507 {
502 LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); 508 LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners.");
503 return 0; 509 return 0;