aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorOren Hurvitz2013-10-31 12:50:17 +0200
committerJustin Clark-Casey (justincc)2014-01-18 01:26:30 +0000
commit50ea2e0d67a9edee86d76b2fa8d4561710326461 (patch)
tree36e811edcd95110d6cf5c23f10a92924ef5d0494 /OpenSim
parentRevert "Fixed: Windlight functions caused an error if called when the script'... (diff)
downloadopensim-SC_OLD-50ea2e0d67a9edee86d76b2fa8d4561710326461.zip
opensim-SC_OLD-50ea2e0d67a9edee86d76b2fa8d4561710326461.tar.gz
opensim-SC_OLD-50ea2e0d67a9edee86d76b2fa8d4561710326461.tar.bz2
opensim-SC_OLD-50ea2e0d67a9edee86d76b2fa8d4561710326461.tar.xz
Fixed: Windlight functions caused an error if called when the script's owner isn't in the scene
Diffstat (limited to 'OpenSim')
-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;